web/admin: improve delete modal for stage bindings and policy bindings

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-23 17:43:17 +02:00
parent 59f04963be
commit a9af40f85c
4 changed files with 26 additions and 0 deletions

View File

@ -2826,6 +2826,7 @@ msgstr "Optionally set this to your parent domain, if you want authentication an
#: src/pages/flows/BoundStagesList.ts #: src/pages/flows/BoundStagesList.ts
#: src/pages/flows/StageBindingForm.ts #: src/pages/flows/StageBindingForm.ts
#: src/pages/policies/BoundPoliciesList.ts #: src/pages/policies/BoundPoliciesList.ts
#: src/pages/policies/BoundPoliciesList.ts
#: src/pages/policies/PolicyBindingForm.ts #: src/pages/policies/PolicyBindingForm.ts
#: src/pages/stages/prompt/PromptForm.ts #: src/pages/stages/prompt/PromptForm.ts
#: src/pages/stages/prompt/PromptListPage.ts #: src/pages/stages/prompt/PromptListPage.ts
@ -2973,6 +2974,7 @@ msgstr "Policy / Group / User Bindings"
msgid "Policy / Policies" msgid "Policy / Policies"
msgstr "Policy / Policies" msgstr "Policy / Policies"
#: src/pages/policies/BoundPoliciesList.ts
#: src/pages/policies/BoundPoliciesList.ts #: src/pages/policies/BoundPoliciesList.ts
msgid "Policy / User / Group" msgid "Policy / User / Group"
msgstr "Policy / User / Group" msgstr "Policy / User / Group"
@ -3716,6 +3718,7 @@ msgstr "Sources"
msgid "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins" msgid "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins"
msgstr "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins" msgstr "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins"
#: src/pages/flows/BoundStagesList.ts
#: src/pages/flows/StageBindingForm.ts #: src/pages/flows/StageBindingForm.ts
msgid "Stage" msgid "Stage"
msgstr "Stage" msgstr "Stage"
@ -3736,6 +3739,10 @@ msgstr "Stage Configuration"
msgid "Stage binding(s)" msgid "Stage binding(s)"
msgstr "Stage binding(s)" msgstr "Stage binding(s)"
#: src/pages/flows/BoundStagesList.ts
msgid "Stage type"
msgstr "Stage type"
#: src/pages/stages/authenticator_validate/AuthenticatorValidateStageForm.ts #: src/pages/stages/authenticator_validate/AuthenticatorValidateStageForm.ts
msgid "Stage used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again." msgid "Stage used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again."
msgstr "Stage used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again." msgstr "Stage used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again."

View File

@ -2818,6 +2818,7 @@ msgstr ""
#: src/pages/flows/BoundStagesList.ts #: src/pages/flows/BoundStagesList.ts
#: src/pages/flows/StageBindingForm.ts #: src/pages/flows/StageBindingForm.ts
#: src/pages/policies/BoundPoliciesList.ts #: src/pages/policies/BoundPoliciesList.ts
#: src/pages/policies/BoundPoliciesList.ts
#: src/pages/policies/PolicyBindingForm.ts #: src/pages/policies/PolicyBindingForm.ts
#: src/pages/stages/prompt/PromptForm.ts #: src/pages/stages/prompt/PromptForm.ts
#: src/pages/stages/prompt/PromptListPage.ts #: src/pages/stages/prompt/PromptListPage.ts
@ -2965,6 +2966,7 @@ msgstr ""
msgid "Policy / Policies" msgid "Policy / Policies"
msgstr "" msgstr ""
#: src/pages/policies/BoundPoliciesList.ts
#: src/pages/policies/BoundPoliciesList.ts #: src/pages/policies/BoundPoliciesList.ts
msgid "Policy / User / Group" msgid "Policy / User / Group"
msgstr "" msgstr ""
@ -3708,6 +3710,7 @@ msgstr ""
msgid "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins" msgid "Sources of identities, which can either be synced into authentik's database, like LDAP, or can be used by users to authenticate and enroll themselves, like OAuth and social logins"
msgstr "" msgstr ""
#: src/pages/flows/BoundStagesList.ts
#: src/pages/flows/StageBindingForm.ts #: src/pages/flows/StageBindingForm.ts
msgid "Stage" msgid "Stage"
msgstr "" msgstr ""
@ -3728,6 +3731,10 @@ msgstr ""
msgid "Stage binding(s)" msgid "Stage binding(s)"
msgstr "" msgstr ""
#: src/pages/flows/BoundStagesList.ts
msgid "Stage type"
msgstr ""
#: src/pages/stages/authenticator_validate/AuthenticatorValidateStageForm.ts #: src/pages/stages/authenticator_validate/AuthenticatorValidateStageForm.ts
msgid "Stage used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again." msgid "Stage used to configure Authenticator when user doesn't have any compatible devices. After this configuration Stage passes, the user is not prompted again."
msgstr "" msgstr ""

View File

@ -48,6 +48,12 @@ export class BoundStagesList extends Table<FlowStageBinding> {
return html`<ak-forms-delete-bulk return html`<ak-forms-delete-bulk
objectLabel=${t`Stage binding(s)`} objectLabel=${t`Stage binding(s)`}
.objects=${this.selectedElements} .objects=${this.selectedElements}
.metadata=${(item: FlowStageBinding) => {
return [
{ key: t`Stage`, value: item.stageObj?.name },
{ key: t`Stage type`, value: item.stageObj?.verboseName },
];
}}
.usedBy=${(item: FlowStageBinding) => { .usedBy=${(item: FlowStageBinding) => {
return new FlowsApi(DEFAULT_CONFIG).flowsBindingsUsedByList({ return new FlowsApi(DEFAULT_CONFIG).flowsBindingsUsedByList({
fsbUuid: item.pk, fsbUuid: item.pk,

View File

@ -100,6 +100,12 @@ export class BoundPoliciesList extends Table<PolicyBinding> {
return html`<ak-forms-delete-bulk return html`<ak-forms-delete-bulk
objectLabel=${t`Policy binding(s)`} objectLabel=${t`Policy binding(s)`}
.objects=${this.selectedElements} .objects=${this.selectedElements}
.metadata=${(item: PolicyBinding) => {
return [
{ key: t`Order`, value: item.order },
{ key: t`Policy / User / Group`, value: this.getPolicyUserGroupRow(item) },
];
}}
.usedBy=${(item: PolicyBinding) => { .usedBy=${(item: PolicyBinding) => {
return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsUsedByList({ return new PoliciesApi(DEFAULT_CONFIG).policiesBindingsUsedByList({
policyBindingUuid: item.pk, policyBindingUuid: item.pk,