Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Enforcing SecurityAdmin::$hidden_permissions, refactoring error

  • Loading branch information...
commit 18932b5be584839d1b6b4521f972140a7cd71d83 1 parent a5b7a22
@chillu chillu authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 security/Group.php
View
6 security/Group.php
@@ -78,7 +78,7 @@ public function getCMSFields() {
),
$permissionsTab = new Tab('Permissions', _t('SecurityAdmin.PERMISSIONS', 'Permissions'),
- new PermissionCheckboxSetField(
+ $permissionsField = new PermissionCheckboxSetField(
'Permissions',
false,
'Permission',
@@ -89,6 +89,10 @@ public function getCMSFields() {
)
);
+ // Filter permissions
+ // TODO SecurityAdmin coupling, not easy to get to the form fields through GridFieldPopupForms
+ $permissionsField->setHiddenPermissions(SecurityAdmin::$hidden_permissions);
+
if($this->ID) {
$config = new GridFieldConfig_RelationEditor();
$config->addComponents(new GridFieldExporter());
Please sign in to comment.
Something went wrong with that request. Please try again.