From e1249d3760570a5c7cb693c37dd5a02547b17060 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 7 Aug 2022 13:02:47 +0200 Subject: [PATCH] providers/oauth2: fix scopes without descriptions not being saved in consent Signed-off-by: Jens Langhammer --- authentik/providers/oauth2/views/userinfo.py | 2 -- web/src/flows/stages/consent/ConsentStage.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/authentik/providers/oauth2/views/userinfo.py b/authentik/providers/oauth2/views/userinfo.py index efed0f43f..4a6f0de9c 100644 --- a/authentik/providers/oauth2/views/userinfo.py +++ b/authentik/providers/oauth2/views/userinfo.py @@ -34,8 +34,6 @@ class UserInfoView(View): """Get a list of all Scopes's descriptions""" scope_descriptions = [] for scope in ScopeMapping.objects.filter(scope_name__in=scopes).order_by("scope_name"): - if scope.description == "": - continue scope_descriptions.append(PermissionDict(id=scope.scope_name, name=scope.description)) # GitHub Compatibility Scopes are handled differently, since they required custom paths # Hence they don't exist as Scope objects diff --git a/web/src/flows/stages/consent/ConsentStage.ts b/web/src/flows/stages/consent/ConsentStage.ts index 1e95eee04..d9e9b6b44 100644 --- a/web/src/flows/stages/consent/ConsentStage.ts +++ b/web/src/flows/stages/consent/ConsentStage.ts @@ -70,7 +70,7 @@ export class ConsentStage extends BaseStage ${this.challenge.permissions.map((permission) => { return html`
  • - ${permission.name} + ${permission.name === "" ? permission.id : permission.name}
  • `; })}