Permalink
Browse files

ENHANCEMENT Using GridField to edit roles in SecurityAdmin

  • Loading branch information...
1 parent fe29d4e commit e9a2de35c2e4d80d2b4faa98bbf277ffbdcba5c5 @chillu chillu committed Mar 5, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 admin/code/SecurityAdmin.php
@@ -125,19 +125,20 @@ function RootForm() {
// Add roles editing interface
if(Permission::check('APPLY_ROLES')) {
- $rolesCTF = new ComplexTableField(
- $this,
+ $rolesField = new GridField(
'Roles',
- 'PermissionRole'
+ false,
+ DataList::create('PermissionRole'),
+ GridFieldConfig_RecordEditor::create()
);
- $rolesCTF->setPermissions(array('add', 'edit', 'delete'));
+ // $rolesCTF->setPermissions(array('add', 'edit', 'delete'));
$rolesTab = $fields->findOrMakeTab('Root.Roles', _t('SecurityAdmin.TABROLES', 'Roles'));
$rolesTab->push(new LiteralField(
'RolesDescription',
''
));
- $rolesTab->push($rolesCTF);
+ $rolesTab->push($rolesField);
}
$actions = new FieldList();

0 comments on commit e9a2de3

Please sign in to comment.