core: improve messaging when creating a recovery link for a user when no recovery flow exists

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-04-16 10:09:46 +02:00
parent 1992b89154
commit 5e67f68f2b
6 changed files with 59 additions and 30 deletions

View File

@ -737,8 +737,8 @@ msgstr "Copy Key"
#: src/pages/stages/prompt/PromptStageForm.ts:98
#: src/pages/user-settings/tokens/UserTokenList.ts:50
#: src/pages/user-settings/tokens/UserTokenList.ts:58
#: src/pages/users/UserListPage.ts:144
#: src/pages/users/UserListPage.ts:152
#: src/pages/users/UserListPage.ts:151
#: src/pages/users/UserListPage.ts:159
msgid "Create"
msgstr "Create"
@ -808,7 +808,7 @@ msgstr "Create Stage binding"
msgid "Create Token"
msgstr "Create Token"
#: src/pages/users/UserListPage.ts:147
#: src/pages/users/UserListPage.ts:154
msgid "Create User"
msgstr "Create User"
@ -1531,7 +1531,7 @@ msgstr "If this flag is set, this Stage will jump to the next Stage when no Invi
msgid "If your authentik Instance is using a self-signed certificate, set this value."
msgstr "If your authentik Instance is using a self-signed certificate, set this value."
#: src/pages/users/UserListPage.ts:136
#: src/pages/users/UserListPage.ts:143
msgid "Impersonate"
msgstr "Impersonate"
@ -1996,6 +1996,10 @@ msgstr "No policies are currently bound to this object."
msgid "No policies cached. Users may experience slow response times."
msgstr "No policies cached. Users may experience slow response times."
#: src/pages/users/UserListPage.ts:135
msgid "No recovery flow is configured."
msgstr "No recovery flow is configured."
#: src/pages/flows/BoundStagesList.ts:114
msgid "No stages are currently bound to this flow."
msgstr "No stages are currently bound to this flow."
@ -2538,7 +2542,7 @@ msgstr "Required"
msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
msgstr "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
#: src/pages/users/UserListPage.ts:133
#: src/pages/users/UserListPage.ts:140
#: src/pages/users/UserViewPage.ts:165
msgid "Reset Password"
msgstr "Reset Password"

View File

@ -731,8 +731,8 @@ msgstr ""
#: src/pages/stages/prompt/PromptStageForm.ts:98
#: src/pages/user-settings/tokens/UserTokenList.ts:50
#: src/pages/user-settings/tokens/UserTokenList.ts:58
#: src/pages/users/UserListPage.ts:144
#: src/pages/users/UserListPage.ts:152
#: src/pages/users/UserListPage.ts:151
#: src/pages/users/UserListPage.ts:159
msgid "Create"
msgstr ""
@ -802,7 +802,7 @@ msgstr ""
msgid "Create Token"
msgstr ""
#: src/pages/users/UserListPage.ts:147
#: src/pages/users/UserListPage.ts:154
msgid "Create User"
msgstr ""
@ -1523,7 +1523,7 @@ msgstr ""
msgid "If your authentik Instance is using a self-signed certificate, set this value."
msgstr ""
#: src/pages/users/UserListPage.ts:136
#: src/pages/users/UserListPage.ts:143
msgid "Impersonate"
msgstr ""
@ -1988,6 +1988,10 @@ msgstr ""
msgid "No policies cached. Users may experience slow response times."
msgstr ""
#: src/pages/users/UserListPage.ts:135
msgid "No recovery flow is configured."
msgstr ""
#: src/pages/flows/BoundStagesList.ts:114
msgid "No stages are currently bound to this flow."
msgstr ""
@ -2530,7 +2534,7 @@ msgstr ""
msgid "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
msgstr ""
#: src/pages/users/UserListPage.ts:133
#: src/pages/users/UserListPage.ts:140
#: src/pages/users/UserViewPage.ts:165
msgid "Reset Password"
msgstr ""

View File

@ -127,6 +127,13 @@ export class UserListPage extends TablePage<User> {
message: t`Successfully generated recovery link`,
description: rec.link
});
}).catch((ex: Response) => {
ex.json().then(() => {
showMessage({
level: MessageLevel.error,
message: t`No recovery flow is configured.`,
});
});
});
}}>
${t`Reset Password`}