Permalink
Browse files

MINOR Enforcing SecurityAdmin::$hidden_permissions, refactoring error

  • Loading branch information...
1 parent a5b7a22 commit 18932b5be584839d1b6b4521f972140a7cd71d83 @chillu chillu committed Mar 6, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 security/Group.php
View
@@ -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());

0 comments on commit 18932b5

Please sign in to comment.