From 4a6acf6e353247f0fade48416424c8857ef35d70 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 23 Feb 2010 00:41:27 +0000 Subject: [PATCH] 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 --- security/Member.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/security/Member.php b/security/Member.php index 921e30b3a..b26f93703 100755 --- a/security/Member.php +++ b/security/Member.php @@ -1021,9 +1021,16 @@ 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);