Skip to content

Commit

Permalink
YDA-5392: notify user when removing datamanager group and group is no…
Browse files Browse the repository at this point in the history
…t empty
  • Loading branch information
HarmdR authored Sep 28, 2023
1 parent 9b08ac9 commit 83815ee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions uuGroupPolicyChecks.r
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,11 @@ uuGroupPolicyCanGroupRemove(*actor, *groupName, *allowed, *reason) {

uuGroupUserIsManager(*groupName, *actor, *isManager);
if (*isManager || *actorUserType == "rodsadmin") {
# v These groups are user-removable v
if (*groupName like regex "(grp|intake|research|deposit|vault)-.*") {
# NB: Only rodsadmin can remove datamanager groups.
# Even datamanager group managers cannot remove their own group.
# Only a rodsadmin can remove a datamanager-group
# Even datamanager group managers cannot remove their own group.
# v These groups are user-removable v
if (*groupName like regex "(grp|intake|research|deposit|vault)-.*"
|| (*groupName like regex "(datamanager)-.*") && *actorUserType == "rodsadmin") {
*homeCollection = "/$rodsZoneClient/home/*groupName";
*homeCollectionIsEmpty = true;

Expand Down

0 comments on commit 83815ee

Please sign in to comment.