[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 259/459: fix attribute updates and display
From: |
gnunet |
Subject: |
[reclaim-ui] 259/459: fix attribute updates and display |
Date: |
Fri, 11 Jun 2021 23:25:51 +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 98e83f7f85a4dfa14c80c7b4e7c8d59252aff5af
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Tue Aug 4 22:30:15 2020 +0200
fix attribute updates and display
---
src/app/edit-identity/edit-identity.component.ts | 14 ++++++++++----
src/app/identity-list/identity-list.component.ts | 11 +++++++++--
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/app/edit-identity/edit-identity.component.ts
b/src/app/edit-identity/edit-identity.component.ts
index e81004f..329c251 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -92,11 +92,11 @@ export class EditIdentityComponent implements OnInit {
let i;
this.attributes = attributes;
for (i = 0; i < attributes.length; i++) {
- if ((attributes[i].attestation === '') &&
+ if ((attributes[i].flag === '0') &&
this.oidcService.getScope().includes(attributes[i].name)) {
this.requestedAttributes.push(attributes[i]);
}
- if ((attributes[i].attestation !== '') &&
+ if ((attributes[i].flag === '1') &&
this.oidcService.getAttestedScope().includes(attributes[i].name)) {
this.requestedAttested.push(attributes[i]);
}
@@ -329,8 +329,14 @@ export class EditIdentityComponent implements OnInit {
if (undefined === this.requestedAttributes) {
return false;
}
- return this.oidcService.getScope().length !==
- this.requestedAttributes.length;
+ var scopes = this.oidcService.getScope();
+ for (var i = 0; i < this.requestedAttributes.length; i++) {
+ if (!scopes.includes(this.requestedAttributes[i].name))
+ {
+ return true;
+ }
+ }
+ return false;
}
private saveIdentityAttested() {
diff --git a/src/app/identity-list/identity-list.component.ts
b/src/app/identity-list/identity-list.component.ts
index 9b333b9..6ca1dbf 100644
--- a/src/app/identity-list/identity-list.component.ts
+++ b/src/app/identity-list/identity-list.component.ts
@@ -152,6 +152,7 @@ export class IdentityListComponent implements OnInit {
this.reclaimService.getAttributes(identity).subscribe(attributes => {
this.attributes[identity.pubkey] = [];
this.requestedAttributes[identity.pubkey] = [];
+ this.requestedAttested = [];
if (attributes === null) {
this.getMissingAttributes(identity);
return;
@@ -247,8 +248,14 @@ export class IdentityListComponent implements OnInit {
if (undefined === this.requestedAttributes[identity.pubkey]) {
return false;
}
- return this.getScopes().length !==
- this.requestedAttributes[identity.pubkey].length;
+ var scopes = this.getScopes();
+ for (var i = 0; i < this.requestedAttributes[identity.pubkey].length; i++)
{
+ if (!scopes.includes(this.requestedAttributes[identity.pubkey][i].name))
+ {
+ return true;
+ }
+ }
+ return false;
}
hasAttributes(identity) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 217/459: fixed attestation-save (already existing attestations were always added again), (continued)
- [reclaim-ui] 217/459: fixed attestation-save (already existing attestations were always added again), gnunet, 2021/06/11
- [reclaim-ui] 222/459: omejdn:api scope deleted, gnunet, 2021/06/11
- [reclaim-ui] 227/459: redirect now to edit-attestations/clientname should be edit-identity/clientname #20, gnunet, 2021/06/11
- [reclaim-ui] 203/459: yarn.lock, gnunet, 2021/06/11
- [reclaim-ui] 234/459: adding attestation works, gnunet, 2021/06/11
- [reclaim-ui] 214/459: package.json, gnunet, 2021/06/11
- [reclaim-ui] 240/459: scopes after idProviderDiscovery, gnunet, 2021/06/11
- [reclaim-ui] 244/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 235/459: code duplicates removed, gnunet, 2021/06/11
- [reclaim-ui] 251/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 259/459: fix attribute updates and display,
gnunet <=
- [reclaim-ui] 243/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 257/459: minor wording change, gnunet, 2021/06/11
- [reclaim-ui] 248/459: minor info change, gnunet, 2021/06/11
- [reclaim-ui] 275/459: more info boxes, gnunet, 2021/06/11
- [reclaim-ui] 250/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 273/459: better requested claim handling, gnunet, 2021/06/11
- [reclaim-ui] 268/459: style, gnunet, 2021/06/11
- [reclaim-ui] 233/459: make discovery experimental, gnunet, 2021/06/11
- [reclaim-ui] 246/459: scopes in configuration, gnunet, 2021/06/11
- [reclaim-ui] 254/459: fix array splicing, gnunet, 2021/06/11