web/admin: fix missing app passwords backend

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-23 16:47:38 +02:00
parent 4cf76fdcda
commit 00e9b91f56
4 changed files with 47 additions and 15 deletions

View File

@ -26,4 +26,4 @@ class TokenBackend(ModelBackend):
)
if not tokens.exists():
return None
return user
return tokens.first().user

View File

@ -4763,6 +4763,18 @@ msgstr "User Reputation"
msgid "User Settings"
msgstr "User Settings"
#: src/pages/stages/password/PasswordStageForm.ts
msgid "User database + LDAP password"
msgstr "User database + LDAP password"
#: src/pages/stages/password/PasswordStageForm.ts
msgid "User database + app passwords"
msgstr "User database + app passwords"
#: src/pages/stages/password/PasswordStageForm.ts
msgid "User database + standard password"
msgstr "User database + standard password"
#: src/pages/user-settings/UserSettingsPage.ts
msgid "User details"
msgstr "User details"
@ -5049,13 +5061,13 @@ msgstr "You can only select providers that match the type of the outpost."
msgid "You're currently impersonating {0}. Click to stop."
msgstr "You're currently impersonating {0}. Click to stop."
#: src/pages/stages/password/PasswordStageForm.ts
msgid "authentik Builtin Database"
msgstr "authentik Builtin Database"
#:
#~ msgid "authentik Builtin Database"
#~ msgstr "authentik Builtin Database"
#: src/pages/stages/password/PasswordStageForm.ts
msgid "authentik LDAP Backend"
msgstr "authentik LDAP Backend"
#:
#~ msgid "authentik LDAP Backend"
#~ msgstr "authentik LDAP Backend"
#: src/elements/forms/DeleteForm.ts
msgid "connecting object will be deleted"

View File

@ -4748,6 +4748,18 @@ msgstr ""
msgid "User Settings"
msgstr ""
#: src/pages/stages/password/PasswordStageForm.ts
msgid "User database + LDAP password"
msgstr ""
#: src/pages/stages/password/PasswordStageForm.ts
msgid "User database + app passwords"
msgstr ""
#: src/pages/stages/password/PasswordStageForm.ts
msgid "User database + standard password"
msgstr ""
#: src/pages/user-settings/UserSettingsPage.ts
msgid "User details"
msgstr ""
@ -5032,13 +5044,13 @@ msgstr ""
msgid "You're currently impersonating {0}. Click to stop."
msgstr ""
#: src/pages/stages/password/PasswordStageForm.ts
msgid "authentik Builtin Database"
msgstr ""
#:
#~ msgid "authentik Builtin Database"
#~ msgstr ""
#: src/pages/stages/password/PasswordStageForm.ts
msgid "authentik LDAP Backend"
msgstr ""
#:
#~ msgid "authentik LDAP Backend"
#~ msgstr ""
#: src/elements/forms/DeleteForm.ts
msgid "connecting object will be deleted"

View File

@ -81,7 +81,15 @@ export class PasswordStageForm extends ModelForm<PasswordStage, string> {
BackendsEnum.DjangoContribAuthBackendsModelBackend,
)}
>
${t`authentik Builtin Database`}
${t`User database + standard password`}
</option>
<option
value=${BackendsEnum.AuthentikCoreTokenAuthTokenBackend}
?selected=${this.isBackendSelected(
BackendsEnum.AuthentikCoreTokenAuthTokenBackend,
)}
>
${t`User database + app passwords`}
</option>
<option
value=${BackendsEnum.AuthentikSourcesLdapAuthLdapBackend}
@ -89,7 +97,7 @@ export class PasswordStageForm extends ModelForm<PasswordStage, string> {
BackendsEnum.AuthentikSourcesLdapAuthLdapBackend,
)}
>
${t`authentik LDAP Backend`}
${t`User database + LDAP password`}
</option>
</select>
<p class="pf-c-form__helper-text">