From b8f9276ca27be417d626ecdfe1547b81b88b32cb Mon Sep 17 00:00:00 2001 From: Harm de Raaff Date: Tue, 26 Sep 2023 10:14:16 +0200 Subject: [PATCH] extended possibility to go deeper into the datamanagergroup removal check in error situation as an admin --- 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;