[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 392/459: fix
From: |
gnunet |
Subject: |
[reclaim-ui] 392/459: fix |
Date: |
Fri, 11 Jun 2021 23:28:04 +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 93e28b3da45faba3141265fe4b9f8f679a710513
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Dec 30 15:44:04 2020 +0900
fix
---
src/app/edit-identity/edit-identity.component.html | 8 +--
src/app/edit-identity/edit-identity.component.ts | 63 +++++++++++-----------
src/locales/en/messages.json | 1 +
3 files changed, 37 insertions(+), 35 deletions(-)
diff --git a/src/app/edit-identity/edit-identity.component.html
b/src/app/edit-identity/edit-identity.component.html
index 39d7f15..5368cce 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -138,10 +138,10 @@
{{claim.value}} <i>({{claim.name}})</i>
</option>
</select>
- </div>
- <div class="alert alert-warning"
- *ngIf="(credentials.length == 0) &&
isClaimCredentialRequested(newRequestedAttribute)">
- {{ getMessage("edit_identity_html@selfissued") }}
+ <div class="alert alert-warning"
+ *ngIf="(credentials.length == 0) &&
isClaimCredentialRequested(newRequestedAttribute)">
+ {{ getMessage("edit_identity_html@credentialRequested") }}
+ </div>
</div>
<div style="float:right;" *ngIf="credentials.length > 0">
<select class="custom-select"
diff --git a/src/app/edit-identity/edit-identity.component.ts
b/src/app/edit-identity/edit-identity.component.ts
index df71408..2de41e0 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -91,7 +91,6 @@ export class EditIdentityComponent implements OnInit {
if (ids[i].name == p['id']) {
this.identity = ids[i];
this.updateAttributes();
- this.updateCredentials();
}
}
});
@@ -167,36 +166,39 @@ export class EditIdentityComponent implements OnInit {
private updateAttributes() {
this.reclaimService.getAttributes(this.identity).subscribe(attributes => {
- this.existingProfileClaims = this.bootstrapClaimArray
(this.oidcService.getStandardProfileClaims());
- this.existingEmailClaims = this.bootstrapClaimArray
(this.oidcService.getStandardEmailClaims());
- this.existingPhoneClaims = this.bootstrapClaimArray
(this.oidcService.getStandardPhoneClaims());
- this.existingAddressClaims = this.bootstrapClaimArray
(this.oidcService.getStandardAddressClaims());
- this.existingNonStandardClaims = [];
- this.attributes = this.sortAttributes(attributes);
- for (let attr of this.attributes) {
- if (this.oidcService.isStandardProfileClaim(attr)) {
- this.existingProfileClaims =
this.updateClaimArray(this.existingProfileClaims, attr);
- } else if (this.oidcService.isStandardEmailClaim(attr)) {
- this.existingEmailClaims =
this.updateClaimArray(this.existingEmailClaims, attr);
- } else if (this.oidcService.isStandardAddressClaim(attr)) {
- this.existingAddressClaims =
this.updateClaimArray(this.existingAddressClaims, attr);
- } else if (this.oidcService.isStandardPhoneClaim(attr)) {
- this.existingPhoneClaims =
this.updateClaimArray(this.existingPhoneClaims, attr);
- } else {
- this.existingNonStandardClaims.push(attr);
+ this.reclaimService.getCredentials(this.identity).subscribe(credentials
=> {
+ this.credentials = credentials;
+ this.existingProfileClaims = this.bootstrapClaimArray
(this.oidcService.getStandardProfileClaims());
+ this.existingEmailClaims = this.bootstrapClaimArray
(this.oidcService.getStandardEmailClaims());
+ this.existingPhoneClaims = this.bootstrapClaimArray
(this.oidcService.getStandardPhoneClaims());
+ this.existingAddressClaims = this.bootstrapClaimArray
(this.oidcService.getStandardAddressClaims());
+ this.existingNonStandardClaims = [];
+ this.attributes = this.sortAttributes(attributes);
+ for (let attr of this.attributes) {
+ if (this.oidcService.isStandardProfileClaim(attr)) {
+ this.existingProfileClaims =
this.updateClaimArray(this.existingProfileClaims, attr);
+ } else if (this.oidcService.isStandardEmailClaim(attr)) {
+ this.existingEmailClaims =
this.updateClaimArray(this.existingEmailClaims, attr);
+ } else if (this.oidcService.isStandardAddressClaim(attr)) {
+ this.existingAddressClaims =
this.updateClaimArray(this.existingAddressClaims, attr);
+ } else if (this.oidcService.isStandardPhoneClaim(attr)) {
+ this.existingPhoneClaims =
this.updateClaimArray(this.existingPhoneClaims, attr);
+ } else {
+ this.existingNonStandardClaims.push(attr);
+ }
}
- }
- this.existingProfileClaims =
this.cleanupClaimArray(this.existingProfileClaims);
- this.existingEmailClaims =
this.cleanupClaimArray(this.existingEmailClaims);
- this.existingPhoneClaims =
this.cleanupClaimArray(this.existingPhoneClaims);
- this.existingAddressClaims =
this.cleanupClaimArray(this.existingAddressClaims);
- this.updateMissingAttributes();
- this.validateEmailForImport();
- this.resetAttributes();
- },
- err => {
- //this.errorInfos.push("Error retrieving attributes for ``" +
identity.name + "''");
- console.log(err);
+ this.existingProfileClaims =
this.cleanupClaimArray(this.existingProfileClaims);
+ this.existingEmailClaims =
this.cleanupClaimArray(this.existingEmailClaims);
+ this.existingPhoneClaims =
this.cleanupClaimArray(this.existingPhoneClaims);
+ this.existingAddressClaims =
this.cleanupClaimArray(this.existingAddressClaims);
+ this.updateMissingAttributes();
+ this.validateEmailForImport();
+ this.resetAttributes();
+ },
+ err => {
+ //this.errorInfos.push("Error retrieving attributes for ``" +
identity.name + "''");
+ console.log(err);
+ });
});
}
@@ -661,7 +663,6 @@ export class EditIdentityComponent implements OnInit {
this.importInProgress = false;
this.oauthService.logOut();
this.updateAttributes();
- this.updateCredentials();
})
).subscribe(res => {
console.log("Finished attribute import.");
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index 4e8a1fa..617df70 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -57,6 +57,7 @@
"edit_identity_html@addRequestedMissingClaim": "Requested but missing
attributes:",
"edit_identity_html@importInfo": "Your email address indicates that you
may be able to import attributes from an external account at
``{{ISSUERNAME}}´´.",
"edit_identity_html@linkAccount": "Import attributes",
+ "edit_identity_html@credentialRequired": "This attribute requires an
attestation but you do not have any credentials.",
"edit_identity_html@standardScopes": "The attributes below correspond to
the standard scopes of the\nOpenID Connect specification: ``profile'',
``email'', ``phone'' and ``address''.",
"edit_identity_html@selfissued": "Self-issued",
"edit_identity_html@importFrom": "Try import from ``{{ISSUERNAME}}´´",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 380/459: quality of life improvements, (continued)
- [reclaim-ui] 380/459: quality of life improvements, gnunet, 2021/06/11
- [reclaim-ui] 383/459: better credential selection, gnunet, 2021/06/11
- [reclaim-ui] 396/459: relax attribute requirements, gnunet, 2021/06/11
- [reclaim-ui] 388/459: significantly simplify identity edit, gnunet, 2021/06/11
- [reclaim-ui] 418/459: more cleanup, gnunet, 2021/06/11
- [reclaim-ui] 431/459: Added translation using Weblate (Portuguese), gnunet, 2021/06/11
- [reclaim-ui] 430/459: mini fix, gnunet, 2021/06/11
- [reclaim-ui] 405/459: fix search icon, gnunet, 2021/06/11
- [reclaim-ui] 381/459: even more quality of life improvements, gnunet, 2021/06/11
- [reclaim-ui] 416/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 392/459: fix,
gnunet <=
- [reclaim-ui] 411/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 410/459: enable filtering, gnunet, 2021/06/11
- [reclaim-ui] 389/459: update, gnunet, 2021/06/11
- [reclaim-ui] 414/459: replace table, gnunet, 2021/06/11
- [reclaim-ui] 400/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 425/459: fix logo, gnunet, 2021/06/11
- [reclaim-ui] 434/459: Added translation using Weblate (Portuguese (Brazil)), gnunet, 2021/06/11
- [reclaim-ui] 429/459: yarn upgrade, gnunet, 2021/06/11
- [reclaim-ui] 390/459: update dependencies, gnunet, 2021/06/11
- [reclaim-ui] 408/459: various fixes, gnunet, 2021/06/11