mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Removed unused Security->addmember() (see MemberTableField and SecurityAdmin->addtogroup())
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@113280 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f8fd60f02b
commit
b31cb6731e
@ -27,7 +27,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
static $subitem_class = "Member";
|
static $subitem_class = "Member";
|
||||||
|
|
||||||
static $allowed_actions = array(
|
static $allowed_actions = array(
|
||||||
'addmember',
|
|
||||||
'addpage',
|
'addpage',
|
||||||
'buildbrokenlinks',
|
'buildbrokenlinks',
|
||||||
'canceldraftchangesdialog',
|
'canceldraftchangesdialog',
|
||||||
|
@ -18,7 +18,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
|
|
||||||
static $allowed_actions = array(
|
static $allowed_actions = array(
|
||||||
'addgroup',
|
'addgroup',
|
||||||
'addmember',
|
|
||||||
'autocomplete',
|
'autocomplete',
|
||||||
'removememberfromgroup',
|
'removememberfromgroup',
|
||||||
'savemember',
|
'savemember',
|
||||||
@ -362,25 +361,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
return FormResponse::respond();
|
return FormResponse::respond();
|
||||||
}
|
}
|
||||||
|
|
||||||
function addmember($className=null) {
|
|
||||||
$data = $_REQUEST;
|
|
||||||
unset($data['ID']);
|
|
||||||
if($className == null) $className = $this->stat('subitem_class');
|
|
||||||
|
|
||||||
if(!singleton($this->stat('subitem_class'))->canCreate()) return Security::permissionFailure($this);
|
|
||||||
|
|
||||||
$record = new $className();
|
|
||||||
|
|
||||||
$record->update($data);
|
|
||||||
$record->write();
|
|
||||||
|
|
||||||
if($data['GroupID']) $record->Groups()->add((int)$data['GroupID']);
|
|
||||||
|
|
||||||
FormResponse::add("reloadMemberTableField();");
|
|
||||||
|
|
||||||
return FormResponse::respond();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the entire site tree as a nested set of ULs.
|
* Return the entire site tree as a nested set of ULs.
|
||||||
* @return string Unordered list HTML
|
* @return string Unordered list HTML
|
||||||
|
Loading…
Reference in New Issue
Block a user