web/flows: fix error during error handling

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-23 14:55:45 +02:00
parent 52f2838f57
commit 85915905dc
3 changed files with 6 additions and 7 deletions

View file

@ -1,7 +1,7 @@
"""Repair missing permissions"""
from django.core.management.base import BaseCommand, no_translations
from django.apps import apps
from django.contrib.auth.management import create_permissions
from django.core.management.base import BaseCommand, no_translations
class Command(BaseCommand): # pragma: no cover

View file

@ -372,10 +372,11 @@ class Outpost(ManagedModel):
Event.new(
action=EventAction.SYSTEM_EXCEPTION,
message=(
"While setting the permissions for the service-account, a permission "
"was not found: "
"Check https://goauthentik.io/docs/troubleshooting/missing_permission"
) + exception_to_string(exc),
"While setting the permissions for the service-account, a "
"permission was not found: Check "
"https://goauthentik.io/docs/troubleshooting/missing_permission"
)
+ exception_to_string(exc),
).set_user(user).save()
else:
app_label, perm = model_or_perm.split(".")

View file

@ -159,8 +159,6 @@ export class FlowExecutor extends LitElement implements StageHost {
let body = "";
if (error instanceof Error) {
body = error.message;
} else if (error instanceof Response) {
body = await error.text();
}
this.challenge = {
type: ChallengeChoices.Shell,