mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FEATURE View and select groups for a specific member via the member popup in admin/security (requires EDIT_PERMISSIONS) (from r98880)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99648 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
02c188633c
commit
4a6acf6e35
@ -1021,10 +1021,17 @@ class Member extends DataObject {
|
|||||||
$mainFields->removeByName('LastVisited');
|
$mainFields->removeByName('LastVisited');
|
||||||
|
|
||||||
$fields->removeByName('Subscriptions');
|
$fields->removeByName('Subscriptions');
|
||||||
|
|
||||||
// Groups relation will get us into logical conflicts because
|
// Groups relation will get us into logical conflicts because
|
||||||
// Members are displayed within group edit form in SecurityAdmin
|
// Members are displayed within group edit form in SecurityAdmin
|
||||||
$fields->removeByName('Groups');
|
$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);
|
$this->extend('updateCMSFields', $fields);
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
|
Loading…
Reference in New Issue
Block a user