mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merged revisions 52798 via svnmerge from
http://svn.silverstripe.com/open/modules/sapphire/branches/govtsecurity ........ r52798 | sminnee | 2008-04-15 22:26:08 +1200 (Tue, 15 Apr 2008) | 1 line People who are given access to SecurityAdmin should only be able to edit admin groups if they have an ADMIN permission ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53489 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0f58f9d232
commit
050c19659c
@ -257,7 +257,10 @@ class Group extends DataObject {
|
|||||||
|
|
||||||
public function canEdit() {
|
public function canEdit() {
|
||||||
if($this->hasMethod('alternateCanEdit')) return $this->alternateCanEdit();
|
if($this->hasMethod('alternateCanEdit')) return $this->alternateCanEdit();
|
||||||
else return Member::currentUserID() ? true : false;
|
else {
|
||||||
|
return Permission::check("ADMIN")
|
||||||
|
|| (Member::currentUserID() && !DataObject::get("Permission", "GroupID = $this->ID AND Code = 'ADMIN'"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user