mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX: Limit the top-right subsites dropdown to the content, files, and security sections. (by sminnee, merged from r102044)
This commit is contained in:
parent
674f4bee27
commit
0760673568
@ -62,9 +62,16 @@ class LeftAndMainSubsites extends Extension {
|
||||
}
|
||||
}
|
||||
|
||||
// Don't show subsite list in reports section, it doesn't have
|
||||
// any effect there - subsites are filtered through a custom dropdown there, see SubsiteReportWrapper
|
||||
if($this->owner instanceof ReportAdmin) return false;
|
||||
// Whitelist for admin sections which are subsite aware.
|
||||
// For example, don't show subsite list in reports section, it doesn't have
|
||||
// any effect there - subsites are filtered through a custom dropdown there, see SubsiteReportWrapper.
|
||||
if(!(
|
||||
$this->owner instanceof AssetAdmin
|
||||
|| $this->owner instanceof SecurityAdmin
|
||||
|| $this->owner instanceof CMSMain)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$list = $this->Subsites();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user