From 8396b4d2d38ad9eaaa05bc2d2cc587f563a00385 Mon Sep 17 00:00:00 2001 From: rkboyce Date: Mon, 6 May 2024 13:50:22 +0000 Subject: [PATCH] changed the 'shared artifact reader' role checked by Atlas to be the 'public' role since this would remove the need to change WebAPI to add a new system role that pretty much duplicates 'public' --- .../security/access/configure-access-modal.js | 6 +++--- .../cohort-definition-manager.html | 16 ++++++++-------- js/pages/concept-sets/conceptset-manager.js | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/js/components/security/access/configure-access-modal.js b/js/components/security/access/configure-access-modal.js index 0e95ae08a..ce6c795ee 100644 --- a/js/components/security/access/configure-access-modal.js +++ b/js/components/security/access/configure-access-modal.js @@ -115,7 +115,7 @@ define([ // update shareFlag depending on if the shared artifacts reader role is in readAccessList function testForGlobalRead(value, index, array) { - return value.id === 16; + return value.id === 1; // the 'public' role that every use should have } let tst = this.readAccessList().some(testForGlobalRead); this.shareFlag(tst); @@ -156,7 +156,7 @@ define([ this.isLoading(true); try { console.log('grantGlobalReadAccess function called to grant read permissions!! shareflag: ' + this.shareFlag()); - await this.grantAccessFn('16','READ'); // 16 is 'shared artifacts reader', a SYSTEM role every user should have + await this.grantAccessFn('1','READ'); // 16 is the 'public' role, a SYSTEM role every user should have await this.loadAccessList(); } catch (ex) { console.log(ex); @@ -168,7 +168,7 @@ define([ this.isLoading(true); try { console.log('revokeGlobalReadAccess function called to REVOKE read permissions!! shareflag: ' + this.shareFlag()); - await this.revokeAccessFn('16','READ'); // 16 is 'shared artifacts reader', a SYSTEM role every user should have + await this.revokeAccessFn('1','READ'); // 16 is the 'public' role, a SYSTEM role every user should have await this.loadAccessList(); } catch (ex) { console.log(ex); diff --git a/js/pages/cohort-definitions/cohort-definition-manager.html b/js/pages/cohort-definitions/cohort-definition-manager.html index 5c2260659..9ea780951 100644 --- a/js/pages/cohort-definitions/cohort-definition-manager.html +++ b/js/pages/cohort-definitions/cohort-definition-manager.html @@ -76,21 +76,21 @@ - +
  • + +
  • - +
  • diff --git a/js/pages/concept-sets/conceptset-manager.js b/js/pages/concept-sets/conceptset-manager.js index b4430c230..c1ee6f61e 100644 --- a/js/pages/concept-sets/conceptset-manager.js +++ b/js/pages/concept-sets/conceptset-manager.js @@ -190,7 +190,7 @@ define([ }) .catch(error => { console.error(error); - alert(ko.i18n('conceptSets.conceptSetManager.shareRoleCheck', 'Error when determining if user can share cohorts')()); + alert(ko.i18n('conceptSets.conceptSetManager.shareRoleCheck', 'Error when determining if user can share concept sets')()); }); }