FEATURE View and select groups for a specific member via the member popup in admin/security (requires EDIT_PERMISSIONS)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@98880 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-02-12 04:01:42 +00:00
parent e26158c522
commit aea2f94a5e

View File

@ -973,10 +973,17 @@ class Member extends DataObject {
$mainFields->removeByName('LastVisited');
$fields->removeByName('Subscriptions');
// Groups relation will get us into logical conflicts because
// Members are displayed within group edit form in SecurityAdmin
$fields->removeByName('Groups');
if(Permission::check('EDIT_PERMISSIONS')) {
$groupsField = new TreeMultiselectField('Groups', false, 'Group');
$fields->findOrMakeTab('Root.Groups', singleton('Group')->i18n_plural_name());
$fields->addFieldToTab('Root.Groups', $groupsField);
}
$this->extend('updateCMSFields', $fields);
return $fields;