mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Removed unused SecurityAdmin->removememberfromgroup() (see MemberTableField)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@113279 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0c177bcbca
commit
f8fd60f02b
@ -381,24 +381,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
return FormResponse::respond();
|
return FormResponse::respond();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removememberfromgroup() {
|
|
||||||
$groupID = $this->urlParams['ID'];
|
|
||||||
$memberID = $this->urlParams['OtherID'];
|
|
||||||
if(is_numeric($groupID) && is_numeric($memberID)) {
|
|
||||||
$member = DataObject::get_by_id('Member', (int) $memberID);
|
|
||||||
|
|
||||||
if(!$member->canDelete()) return Security::permissionFailure($this);
|
|
||||||
|
|
||||||
$member->Groups()->remove((int)$groupID);
|
|
||||||
|
|
||||||
FormResponse::add("reloadMemberTableField();");
|
|
||||||
} else {
|
|
||||||
user_error("SecurityAdmin::removememberfromgroup: Bad parameters: Group=$groupID, Member=$memberID", E_USER_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
@ -429,7 +411,10 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
return $siteTree;
|
return $siteTree;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addgroup() {
|
public function addgroup($request) {
|
||||||
|
// Protect against CSRF on destructive action
|
||||||
|
if(!Form::get_security_token()->checkRequest($request)) return $this->httpError(400);
|
||||||
|
|
||||||
if(!singleton($this->stat('tree_class'))->canCreate()) return Security::permissionFailure($this);
|
if(!singleton($this->stat('tree_class'))->canCreate()) return Security::permissionFailure($this);
|
||||||
|
|
||||||
$newGroup = Object::create($this->stat('tree_class'));
|
$newGroup = Object::create($this->stat('tree_class'));
|
||||||
|
Loading…
Reference in New Issue
Block a user