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:
		| @ -34,8 +34,6 @@ class UserInfoView(View): | |||||||
|         """Get a list of all Scopes's descriptions""" |         """Get a list of all Scopes's descriptions""" | ||||||
|         scope_descriptions = [] |         scope_descriptions = [] | ||||||
|         for scope in ScopeMapping.objects.filter(scope_name__in=scopes).order_by("scope_name"): |         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)) |             scope_descriptions.append(PermissionDict(id=scope.scope_name, name=scope.description)) | ||||||
|         # GitHub Compatibility Scopes are handled differently, since they required custom paths |         # GitHub Compatibility Scopes are handled differently, since they required custom paths | ||||||
|         # Hence they don't exist as Scope objects |         # 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"> |                           <ul class="pf-c-list" id="permmissions"> | ||||||
|                               ${this.challenge.permissions.map((permission) => { |                               ${this.challenge.permissions.map((permission) => { | ||||||
|                                   return html`<li data-permission-code="${permission.id}"> |                                   return html`<li data-permission-code="${permission.id}"> | ||||||
|                                       ${permission.name} |                                       ${permission.name === "" ? permission.id : permission.name} | ||||||
|                                   </li>`; |                                   </li>`; | ||||||
|                               })} |                               })} | ||||||
|                           </ul> |                           </ul> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer