From fb08e1db2b652f4c8fc546e384ecb2c66b230e32 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 9 Aug 2022 17:51:28 +0200 Subject: [PATCH] web/flows: only show permission ids if we have to, hide them if permission list has permissions with description Signed-off-by: Jens Langhammer --- blueprints/system/providers-proxy.yaml | 1 + web/src/flows/stages/consent/ConsentStage.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/blueprints/system/providers-proxy.yaml b/blueprints/system/providers-proxy.yaml index cdba7a544..1214d157d 100644 --- a/blueprints/system/providers-proxy.yaml +++ b/blueprints/system/providers-proxy.yaml @@ -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. diff --git a/web/src/flows/stages/consent/ConsentStage.ts b/web/src/flows/stages/consent/ConsentStage.ts index 7a1629163..518b71245 100644 --- a/web/src/flows/stages/consent/ConsentStage.ts +++ b/web/src/flows/stages/consent/ConsentStage.ts @@ -37,10 +37,13 @@ export class ConsentStage extends BaseStage perm.name === "").length === perms.length; return html`${perms.map((permission) => { - return html`
  • - ${permission.name === "" ? permission.id : permission.name} -
  • `; + let name = permission.name; + if (permission.name === "" && shouldShowId) { + name = permission.id; + } + return html`
  • ${name}
  • `; })}`; }