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
This commit is contained in:
Florian Thoma 2023-04-05 16:33:41 +10:00 committed by GitHub
parent 600f188287
commit cd946b6c80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}