web/flows: only show permission ids if we have to, hide them if permission list has permissions with description
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
f1b167c134
commit
fb08e1db2b
|
@ -10,6 +10,7 @@ entries:
|
|||
attrs:
|
||||
name: "authentik default OAuth Mapping: Proxy outpost"
|
||||
scope_name: ak_proxy
|
||||
description: authentik Proxy - User information
|
||||
expression: |
|
||||
# This mapping is used by the authentik proxy. It passes extra user attributes,
|
||||
# which are used for example for the HTTP-Basic Authentication mapping.
|
||||
|
|
|
@ -37,10 +37,13 @@ export class ConsentStage extends BaseStage<ConsentChallenge, ConsentChallengeRe
|
|||
}
|
||||
|
||||
renderPermissions(perms: Permission[]): TemplateResult {
|
||||
const shouldShowId = perms.filter((perm) => perm.name === "").length === perms.length;
|
||||
return html`${perms.map((permission) => {
|
||||
return html`<li data-permission-code="${permission.id}">
|
||||
${permission.name === "" ? permission.id : permission.name}
|
||||
</li>`;
|
||||
let name = permission.name;
|
||||
if (permission.name === "" && shouldShowId) {
|
||||
name = permission.id;
|
||||
}
|
||||
return html`<li data-permission-code="${permission.id}">${name}</li>`;
|
||||
})}`;
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue