mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Fixed Permission::add_to_hidden_permissions() and Permission::remove_from_hidden_permissions()
This commit is contained in:
parent
7efd19e7cb
commit
0de6dbc848
@ -173,6 +173,7 @@ class PermissionCheckboxSetField extends FormField {
|
||||
$options .= "<li><h5>$categoryName</h5></li>";
|
||||
foreach($permissions as $code => $permission) {
|
||||
if(in_array($code, $this->hiddenPermissions)) continue;
|
||||
if(in_array($code, Permission::$hidden_permissions)) continue;
|
||||
|
||||
$value = $permission['name'];
|
||||
|
||||
|
@ -78,5 +78,6 @@ class PermissionTest extends SapphireTest {
|
||||
|
||||
Permission::remove_from_hidden_permissions('CMS_ACCESS_AssetAdmin');
|
||||
$this->assertContains('CMS_ACCESS_AssetAdmin', $permissionCheckboxSet->Field());
|
||||
Permission::remove_from_hidden_permissions('CMS_ACCESS_CMSMain');
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user