Skip to content

Commit

Permalink
changed the 'shared artifact reader' role checked by Atlas to be the …
Browse files Browse the repository at this point in the history
…'public' role since this would remove the need to change WebAPI to add a new system role that pretty much duplicates 'public'
  • Loading branch information
rkboyce committed May 6, 2024
1 parent b99d5d5 commit 8396b4d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions js/components/security/access/configure-access-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
16 changes: 8 additions & 8 deletions js/pages/cohort-definitions/cohort-definition-manager.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,21 @@
<a data-bind="text: ko.i18n('cohortDefinitions.cohortDefinitionManager.tabs.generation', 'Generation')"></a>
</li>

<!-- <li role="presentation"
data-bind="visible: !previewVersion(), css: { active: $component.tabMode() == 'samples' }, click: clickSampleTab">
<a data-bind="text: ko.i18n('cohortDefinitions.cohortDefinitionManager.tabs.samples', 'Samples')"></a>
</li> -->
<li role="presentation"
data-bind="visible: !previewVersion(), css: { active: $component.tabMode() == 'samples' }, click: clickSampleTab">
<a data-bind="text: ko.i18n('cohortDefinitions.cohortDefinitionManager.tabs.samples', 'Samples')"></a>
</li>

<li role="presentation"
data-bind="visible: !previewVersion(), css: { active: $component.tabMode() == 'reporting' }, click: function() { $component.selectTab('reporting'); }">
<a data-bind="text: ko.i18n('cohortDefinitions.cohortDefinitionManager.tabs.reporting', 'Reporting')"></a>
</li>
<!--

<li role="presentation"
data-bind="visible: !previewVersion(), css: { active: $component.tabMode() == 'explore' }, click: function() { $component.selectTab('explore'); }">
<a data-bind="text: ko.i18n('cohortDefinitions.cohortDefinitionManager.tabs.explore', 'Explore')"></a>
data-bind="visible: !previewVersion(), css: { active: $component.tabMode() == 'explore' }, click: function() { $component.selectTab('explore'); }">
<a data-bind="text: ko.i18n('cohortDefinitions.cohortDefinitionManager.tabs.explore', 'Explore')"></a>
</li>
-->

<li role="presentation"
data-bind="visible: !previewVersion(), css: { active: $component.tabMode() == 'export' }, click: () => { $component.selectTab('export'); refreshPrintFriendly(); }">
<a data-bind="text: ko.i18n('cohortDefinitions.cohortDefinitionManager.tabs.export', 'Export')"></a>
Expand Down
2 changes: 1 addition & 1 deletion js/pages/concept-sets/conceptset-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')());
});
}

Expand Down

0 comments on commit 8396b4d

Please sign in to comment.