gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[reclaim-ui] 270/459: improve authz display


From: gnunet
Subject: [reclaim-ui] 270/459: improve authz display
Date: Fri, 11 Jun 2021 23:26:02 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository reclaim-ui.

commit 8d75229b6a9a00858a754105b3894b7fcc6acfbe
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Thu Aug 6 20:40:15 2020 +0200

    improve authz display
---
 .../authorization-request.component.html           | 14 +++++--------
 src/app/identity-list/identity-list.component.html |  2 +-
 src/app/open-id.service.ts                         | 23 ++++++++++++++++++++++
 3 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/src/app/authorization-request/authorization-request.component.html 
b/src/app/authorization-request/authorization-request.component.html
index 0b66b6d..69de21b 100644
--- a/src/app/authorization-request/authorization-request.component.html
+++ b/src/app/authorization-request/authorization-request.component.html
@@ -12,18 +12,14 @@
   <div class="card-body">
     <strong>{{ oidcService.clientName }}</strong>
     asks you to share personal information.<br/>
-    Choose an identity to let it access the following self-asserted 
information:
+    Choose an identity to let it access the following information:
     <ul>
-      <li *ngFor="let attribute of 
getScopesDescription()"><strong>{{attribute}}</strong>
+      <li *ngFor="let attribute of 
getRequestedStandardScopesWithDescription()"><strong>{{attribute}}</strong></li>
     </ul>
-    <div *ngIf="getRequestedClaims().length > 0">
-      as well as the following third-party attested attributes:
+    <div *ngIf="getRequestedNonStandardScopes().length > 0">
+      as well as the following additional attributes:
       <ul>
-        <ng-container *ngFor="let reference of getRequestedClaims()">
-          <li *ngIf="reference[1] === true"><strong>{{reference[0]}}</strong>
-            <li *ngIf="reference[1] !== true"><strong>{{reference[0]}} 
(optional)</strong>
-        </ng-container>
-
+        <li *ngFor="let attribute of 
getRequestedNonStandardScopes()"><strong>{{attribute}}</strong></li>
       </ul>
     </div>
 
diff --git a/src/app/identity-list/identity-list.component.html 
b/src/app/identity-list/identity-list.component.html
index 40606d9..713b9ff 100644
--- a/src/app/identity-list/identity-list.component.html
+++ b/src/app/identity-list/identity-list.component.html
@@ -101,7 +101,7 @@
                *ngFor="let attribute of attributes[identity.pubkey]">
               <td>
                 <div style="min-width: 15em">
-                  <span *ngIf="isClaimRequested(identity, attribute)" 
class="fa fa-openid"></span> <b>{{getAttributeDescription(attribute)}}</b>
+                  <span *ngIf="isClaimRequested(identity, attribute)" 
class="fa fa-openid mr-1"></span><b>{{getAttributeDescription(attribute)}}</b>
                 </div>
               </td>
               <td>
diff --git a/src/app/open-id.service.ts b/src/app/open-id.service.ts
index a7d2282..c4a26fd 100644
--- a/src/app/open-id.service.ts
+++ b/src/app/open-id.service.ts
@@ -150,6 +150,29 @@ export class OpenIdService {
     return this.scopesDescriptions[scope];
   }
 
+  getRequestedStandardScopesWithDescription(): string[] {
+    var scopes = this.getRequestedScope();
+    var res = [];
+    for (var i = 0; i < scopes.length; i++) {
+      if (undefined !== this.scopesDescriptions[scopes[i]]) {
+        res.push(this.scopesDescriptions[scopes[i]])
+      }
+    }
+    return res;
+  }
+
+  getRequestedNonStandardScopes(): string[] {
+    var scopes = this.getRequestedScope();
+    var res = [];
+    for (var i = 0; i < scopes.length; i++) {
+      if (undefined === this.scopesDescriptions[scopes[i]]) {
+        res.push(scopes[i])
+      }
+    }
+    return res;
+
+  }
+
   getScopesDescriptionList(): any {
     var scopes = this.getRequestedScope();
     var res = [];

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]