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""" """Repair missing permissions"""
from django.core.management.base import BaseCommand, no_translations
from django.apps import apps from django.apps import apps
from django.contrib.auth.management import create_permissions from django.contrib.auth.management import create_permissions
from django.core.management.base import BaseCommand, no_translations
class Command(BaseCommand): # pragma: no cover class Command(BaseCommand): # pragma: no cover

View File

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

View File

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