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:
Damian Mooyman 2016-01-12 10:50:07 +13:00
commit 1d13660530

View File

@ -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) {