Skip to content

Commit

Permalink
Merge pull request #4 from uc-cdis/fix/owner_check_and_remove_dead_code
Browse files Browse the repository at this point in the history
Fix: better name for isPermittedGlobalShareArtifact
  • Loading branch information
rkboyce authored Sep 9, 2024
2 parents b8017b9 + 4872345 commit 01eca8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/pages/cohort-definitions/cohort-definition-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ define(['jquery', 'knockout', 'text!./cohort-definition-manager.html',
if (config.enablePermissionManagement) {
this.userCanShare = ko.observable(
!config.limitedPermissionManagement ||
authApi.isPermittedGlobalShareCohort());
authApi.isPermittedGlobalShareArtifact());
} else {
this.userCanShare = ko.observable(false);
}
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 @@ -179,7 +179,7 @@ define([
if (config.enablePermissionManagement) {
this.userCanShare = ko.observable(
!config.limitedPermissionManagement ||
authApi.isPermittedGlobalShareCohort());
authApi.isPermittedGlobalShareArtifact());
} else {
this.userCanShare = ko.observable(false);
}
Expand Down
4 changes: 2 additions & 2 deletions js/services/AuthAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ define(function(require, exports) {
return isPermitted('cohortdefinition:' + id + ':copy:get');
}

var isPermittedGlobalShareCohort = function() {
var isPermittedGlobalShareArtifact = function() {
// special * permission (intended for admins) that allows the
// user to share any artifact with a "global reader role":
return isPermitted('artifact:global:share:put');
Expand Down Expand Up @@ -592,7 +592,7 @@ define(function(require, exports) {
isPermittedReadCohort: isPermittedReadCohort,
isPermittedCreateCohort: isPermittedCreateCohort,
isPermittedCopyCohort: isPermittedCopyCohort,
isPermittedGlobalShareCohort: isPermittedGlobalShareCohort,
isPermittedGlobalShareArtifact: isPermittedGlobalShareArtifact,
isPermittedUpdateCohort: isPermittedUpdateCohort,
isPermittedDeleteCohort: isPermittedDeleteCohort,
isPermittedGenerateCohort: isPermittedGenerateCohort,
Expand Down

0 comments on commit 01eca8c

Please sign in to comment.