From 6f5dda5caa8fac9657564856c21329a71cff6796 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Mon, 1 Mar 2010 21:27:04 +0000 Subject: [PATCH] BUGFIX: Limit the related page dropdown to linking to subsites that you have CMS access to. (from r88953) --- code/RelatedPageLink.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/RelatedPageLink.php b/code/RelatedPageLink.php index 1fe467f..7fa7102 100644 --- a/code/RelatedPageLink.php +++ b/code/RelatedPageLink.php @@ -18,9 +18,10 @@ class RelatedPageLink extends DataObject { ); function getCMSFields() { - $subsites = Subsite::getSubsitesForMember(); + $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))); }