From d4379ecd31a0138c5de3e07c85c97f769040a646 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 9 Jun 2021 19:25:27 +0200 Subject: [PATCH] flows: fix configure_url not being set correctly User settings Signed-off-by: Jens Langhammer --- authentik/flows/api/stages.py | 4 ++-- .../user-settings/settings/UserSettingsAuthenticatorDuo.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/authentik/flows/api/stages.py b/authentik/flows/api/stages.py index 0b83dbf8b..60f66ee39 100644 --- a/authentik/flows/api/stages.py +++ b/authentik/flows/api/stages.py @@ -91,10 +91,10 @@ class StageViewSet( if not user_settings: continue user_settings.initial_data["object_uid"] = str(stage.pk) - if hasattr(stage, "configure_url"): + if hasattr(stage, "configure_flow"): user_settings.initial_data["configure_url"] = reverse( "authentik_flows:configure", - kwargs={"stage_uuid": stage.uuid.hex}, + kwargs={"stage_uuid": stage.pk}, ) if not user_settings.is_valid(): LOGGER.warning(user_settings.errors) diff --git a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts index 75ae2b4da..c1530d5fe 100644 --- a/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts +++ b/web/src/pages/user-settings/settings/UserSettingsAuthenticatorDuo.ts @@ -57,7 +57,6 @@ export class UserSettingsAuthenticatorDuo extends BaseUserSettings {
${t`Duo`}
- ${this.renderDisabled()} ${until(new AuthenticatorsApi(DEFAULT_CONFIG).authenticatorsDuoList({}).then((devices) => { return devices.results.length > 0 ? this.renderEnabled() : this.renderDisabled(); }))}