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)
This commit is contained in:
parent
cc11a1fa37
commit
6f5dda5caa
@ -18,9 +18,10 @@ class RelatedPageLink extends DataObject {
|
|||||||
);
|
);
|
||||||
|
|
||||||
function getCMSFields() {
|
function getCMSFields() {
|
||||||
$subsites = Subsite::getSubsitesForMember();
|
$subsites = Subsite::accessible_sites("CMS_ACCESS_CMSMain");
|
||||||
if(!$subsites) $subsites = new DataObjectSet();
|
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)));
|
$subsites->push(new ArrayData(array('Title' => 'Main site', 'ID' => 0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user