mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX: Don't show 'All Groups' in security area unless you have CMS_ACCESS_SecurityAdmin access on Subsite ID 0 (from r89119)
This commit is contained in:
parent
90b2068bcd
commit
fb7a5aa72d
@ -40,8 +40,8 @@ class LeftAndMainSubsites extends Extension {
|
||||
|
||||
public function changesubsite() {
|
||||
$id = $_REQUEST['SubsiteID'];
|
||||
|
||||
Subsite::changeSubsite($id);
|
||||
|
||||
Subsite::changeSubsite($id==-1 ? 0 : $id);
|
||||
|
||||
if ($id == '-1') Cookie::set('noSubsiteFilter', 'true', 1);
|
||||
else Cookie::set('noSubsiteFilter', 'false', 1);
|
||||
@ -68,7 +68,9 @@ class LeftAndMainSubsites extends Extension {
|
||||
|
||||
case "SecurityAdmin":
|
||||
$subsites = Subsite::accessible_sites($accessPerm, true, "Groups accessing all sites");
|
||||
$subsites->push(new ArrayData(array('Title' => 'All groups', 'ID' => -1)));
|
||||
if($subsites->find('ID',0)) {
|
||||
$subsites->push(new ArrayData(array('Title' => 'All groups', 'ID' => -1)));
|
||||
}
|
||||
break;
|
||||
|
||||
case "CMSMain":
|
||||
|
Loading…
Reference in New Issue
Block a user