providers/oauth2: fix scopes without descriptions not being saved in consent

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-08-07 13:02:47 +02:00
parent dcbf106daa
commit e1249d3760
2 changed files with 1 additions and 3 deletions

View file

@ -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

View file

@ -70,7 +70,7 @@ export class ConsentStage extends BaseStage<ConsentChallenge, ConsentChallengeRe
<ul class="pf-c-list" id="permmissions">
${this.challenge.permissions.map((permission) => {
return html`<li data-permission-code="${permission.id}">
${permission.name}
${permission.name === "" ? permission.id : permission.name}
</li>`;
})}
</ul>