From 83815eebabb597bc01f7d67fde4d93757e8f4491 Mon Sep 17 00:00:00 2001 From: HarmdR Date: Thu, 28 Sep 2023 14:07:47 +0200 Subject: [PATCH] YDA-5392: notify user when removing datamanager group and group is not empty --- uuGroupPolicyChecks.r | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/uuGroupPolicyChecks.r b/uuGroupPolicyChecks.r index 2b04617af..69a76b53e 100644 --- a/uuGroupPolicyChecks.r +++ b/uuGroupPolicyChecks.r @@ -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;