mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
BUGFIX: Limit the related page dropdown to linking to subsites that you have CMS access to. (from r88953) (from r96297)
This commit is contained in:
parent
05c07fc824
commit
b823bd286e
@ -18,10 +18,10 @@ class RelatedPageLink extends DataObject {
|
||||
);
|
||||
|
||||
function getCMSFields() {
|
||||
$subsites = Subsite::accessible_sites("CMS_ACCESS_CMSMain", true);
|
||||
$subsites = Subsite::accessible_sites("CMS_ACCESS_CMSMain");
|
||||
if(!$subsites) $subsites = new DataObjectSet();
|
||||
|
||||
if(Subsite::hasMainSitePermission()) {
|
||||
if(Subsite::hasMainSitePermission(null, array("CMS_ACCESS_CMSMain"))) {
|
||||
$subsites->push(new ArrayData(array('Title' => 'Main site', "\"ID\"" => 0)));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user