From 9281ebc64764a58f86f685f9765e1d8b60995e5a Mon Sep 17 00:00:00 2001 From: Russell Michell Date: Thu, 23 May 2013 14:48:24 +1200 Subject: [PATCH] BUGFIX: Content authors with SiteTree#canView() but not SiteTree#canEdit() were unable to click on SiteTree items in the CMS. - The 'disabled' attribute in
  • will now only render if the author _really_ can't do _anything_ --- code/model/SiteTree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index fbe99aa8..04af9b6d 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -2657,7 +2657,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid if(!$this->canAddChildren()) $classes .= " nochildren"; - if(!$this->canEdit() && !$this->canAddChildren()) + if(!$this->canView() && !$this->canEdit() && !$this->canAddChildren()) $classes .= " disabled"; if(!$this->ShowInMenus)