From cd946b6c80957c6b55ca63f0cabbe659e72c8a95 Mon Sep 17 00:00:00 2001 From: Florian Thoma Date: Wed, 5 Apr 2023 16:33:41 +1000 Subject: [PATCH] Group visibility for SITETREE_GRANT_ACCESS permissions Make groups visible if member has SITETREE_GRANT_ACCESS permissions, otherwise the dropdown for selecting the group is empty --- src/Security/Group.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Security/Group.php b/src/Security/Group.php index eb279e111..aba30eaf6 100755 --- a/src/Security/Group.php +++ b/src/Security/Group.php @@ -635,6 +635,11 @@ class Group extends DataObject return true; } + // if user can grant access for specific groups, they need to be able to see the groups + if (Permission::checkMember($member, "SITETREE_GRANT_ACCESS")) { + return true; + } + return false; }