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:
parent
dcbf106daa
commit
e1249d3760
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Reference in New Issue