mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4907 from d-rivera-c/pulls/group-roles-admin-check
Display all roles when an admin, filter by OnlyAdminCanApply when not
This commit is contained in:
commit
1d13660530
@ -183,7 +183,7 @@ class Group extends DataObject {
|
||||
|
||||
// Add roles (and disable all checkboxes for inherited roles)
|
||||
$allRoles = PermissionRole::get();
|
||||
if(Permission::check('ADMIN')) {
|
||||
if(!Permission::check('ADMIN')) {
|
||||
$allRoles = $allRoles->filter("OnlyAdminCanApply", 0);
|
||||
}
|
||||
if($this->ID) {
|
||||
|
Loading…
Reference in New Issue
Block a user