[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 187/459: add issuer display
From: |
gnunet |
Subject: |
[reclaim-ui] 187/459: add issuer display |
Date: |
Fri, 11 Jun 2021 23:24:39 +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 70eec9934322ebbc25719776688c70874886368a
Author: Schanzenbach, Martin <mschanzenbach@posteo.de>
AuthorDate: Fri Feb 7 18:43:33 2020 +0100
add issuer display
---
src/app/attestation.ts | 1 +
.../edit-attestations.component.html | 10 +++++-----
.../edit-attestations/edit-attestations.component.ts | 2 +-
src/app/edit-identity/edit-identity.component.html | 2 +-
src/app/edit-identity/edit-identity.component.ts | 19 ++++++++++++++++++-
5 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/src/app/attestation.ts b/src/app/attestation.ts
index efd5012..a512c83 100644
--- a/src/app/attestation.ts
+++ b/src/app/attestation.ts
@@ -5,5 +5,6 @@ export class Attestation {
public id: string,
public value: string,
public type: string,
+ public issuer: string,
public attributes: Attribute[]) {}
}
diff --git a/src/app/edit-attestations/edit-attestations.component.html
b/src/app/edit-attestations/edit-attestations.component.html
index bcfff6b..075faad 100644
--- a/src/app/edit-attestations/edit-attestations.component.html
+++ b/src/app/edit-attestations/edit-attestations.component.html
@@ -11,11 +11,11 @@
<table class="table pb-1" style="">
<thead>
<tr>
- <th>Attestation Name</th>
- <th>Attestation Type</th>
- <th>Attestation Value</th>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Value</th>
<!--<th>Issuer</th>-->
- <th>Attestation ID</th>
+ <th>Issuer</th>
</tr>
</thead>
<tbody>
@@ -31,7 +31,7 @@
<div style="min-width: 15em">
</div>
</td>-->
- <td><div style="min-width: 15em">{{attestation.id}}</div></td>
+ <td><div style="min-width: 15em">{{attestation.issuer}}</div></td>
<td>
<button class="btn btn-primary"
(click)="deleteAttestation(attestation)">
<span class="fa fa-trash"></span>
diff --git a/src/app/edit-attestations/edit-attestations.component.ts
b/src/app/edit-attestations/edit-attestations.component.ts
index 6281998..85116be 100644
--- a/src/app/edit-attestations/edit-attestations.component.ts
+++ b/src/app/edit-attestations/edit-attestations.component.ts
@@ -24,7 +24,7 @@ export class EditAttestationsComponent implements OnInit {
private router: Router) { }
ngOnInit() {
- this.newAttestation = new Attestation('', '', '', '', []);
+ this.newAttestation = new Attestation('', '', '', '', '', []);
this.identity = new Identity('','');
this.attestations = [];
this.activatedRoute.params.subscribe(p => {
diff --git a/src/app/edit-identity/edit-identity.component.html
b/src/app/edit-identity/edit-identity.component.html
index 9d004d1..13609b5 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -62,7 +62,7 @@
<td><div style="min-width: 15em">{{ attribute.name }}</div></td>
<td>
<input *ngIf="!isAttestation(attribute)" placeholder="Value"
[(ngModel)]="attribute.value">
- <span *ngIf="isAttestation(attribute)" >{{ attribute.value }}
issued by {{ getIssuer(attribute) }} as ``{{ attribute.value }}''</span>
+ <span *ngIf="isAttestation(attribute)" >{{
getAttestedValue(attribute) }} issued by <i>{{ getIssuer(attribute) }}</i> as
attribute for ``{{ attribute.value }}''</span>
</td>
<td>
<button class="btn btn-primary"
(click)="deleteAttribute(attribute)" *ngIf="!isAttestation(attribute)">
diff --git a/src/app/edit-identity/edit-identity.component.ts
b/src/app/edit-identity/edit-identity.component.ts
index 9366c10..8a6f63a 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -589,7 +589,24 @@ export class EditIdentityComponent implements OnInit {
//FIXME attestations need an issuer field
getIssuer(attribute: Attribute) {
- return "UNKNOWN";
+ for (let i = 0; i < this.attestations.length; i++) {
+ if (this.attestations[i].id == attribute.attestation) {
+ return this.attestations[i].issuer;
+ }
+ }
+ }
+
+ getAttestedValue(attribute: Attribute) {
+ for (let i = 0; i < this.attestations.length; i++) {
+ if (this.attestations[i].id == attribute.attestation) {
+ for (let j = 0; j < this.attestations[i].attributes.length; j++) {
+ if (attribute.value == this.attestations[i].attributes[j].name) {
+ return this.attestations[i].attributes[j].value;
+ }
+ }
+ }
+ }
+ return "?";
}
getFhGAttestation() {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 170/459: update dependencies, (continued)
- [reclaim-ui] 170/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 205/459: login via omejdn:api works, gnunet, 2021/06/11
- [reclaim-ui] 185/459: minor fixes, gnunet, 2021/06/11
- [reclaim-ui] 206/459: attestation name added, gnunet, 2021/06/11
- [reclaim-ui] 186/459: update to new API and structure, gnunet, 2021/06/11
- [reclaim-ui] 208/459: store idProvider/Attestation(not working), gnunet, 2021/06/11
- [reclaim-ui] 207/459: improved emailNotFoundAlert, gnunet, 2021/06/11
- [reclaim-ui] 193/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 189/459: experimental switch added, gnunet, 2021/06/11
- [reclaim-ui] 191/459: update to angular9; minor bugfixes, gnunet, 2021/06/11
- [reclaim-ui] 187/459: add issuer display,
gnunet <=
- [reclaim-ui] 216/459: idProvider stored in localStorage and loaded to authorization interface, gnunet, 2021/06/11
- [reclaim-ui] 204/459: merge yarn.lock, gnunet, 2021/06/11
- [reclaim-ui] 192/459: minor fixes, gnunet, 2021/06/11
- [reclaim-ui] 195/459: fix parsing claims parameter, gnunet, 2021/06/11
- [reclaim-ui] 218/459: login works properly, gnunet, 2021/06/11
- [reclaim-ui] 188/459: add expiration, gnunet, 2021/06/11
- [reclaim-ui] 198/459: back to where it should be, gnunet, 2021/06/11
- [reclaim-ui] 201/459: started integrating oauthservice for attestation, gnunet, 2021/06/11
- [reclaim-ui] 221/459: logout on server side works #19, gnunet, 2021/06/11
- [reclaim-ui] 220/459: attestation name duplication prevented + trying to logout on serverside, gnunet, 2021/06/11