diff --git a/code/controllers/CMSSettingsController.php b/code/controllers/CMSSettingsController.php index cb8d0e23..a5000edb 100644 --- a/code/controllers/CMSSettingsController.php +++ b/code/controllers/CMSSettingsController.php @@ -6,7 +6,8 @@ class CMSSettingsController extends LeftAndMain { static $menu_priority = -1; static $menu_title = 'Settings'; static $tree_class = 'SiteConfig'; - + static $required_permission_codes = array('EDIT_SITECONFIG'); + public function getResponseNegotiator() { $neg = parent::getResponseNegotiator(); $controller = $this; diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index cc05249d..07801379 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -1569,8 +1569,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid $votes = $this->extend('augmentValidURLSegment'); if($votes) { - $votes = array_filter((array)$votes, 'is_null'); - if($votes) return min($votes); + return min($votes); } return true; diff --git a/javascript/SiteTreeURLSegmentField.js b/javascript/SiteTreeURLSegmentField.js index fc0a183b..55599928 100644 --- a/javascript/SiteTreeURLSegmentField.js +++ b/javascript/SiteTreeURLSegmentField.js @@ -5,7 +5,7 @@ * * Input validation on the URLSegment field */ - $('.field.urlsegment').entwine({ + $('.field.urlsegment:not(.readonly)').entwine({ /** * Constructor: onmatch