mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR changed the method to get a page's siteconfig, it is now subsite aware. (from r89870)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96710 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
bf12972813
commit
5a6131bdde
@ -53,7 +53,7 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
||||
$editorsOptionsSource["OnlyTheseUsers"] = _t('SiteTree.EDITONLYTHESE', "Only these people (choose from list)");
|
||||
$editorsOptionsField->setSource($editorsOptionsSource);
|
||||
|
||||
if (!Permission::check('ADMIN') && !Permission::check('EDIT_SITECONFIG')) {
|
||||
if (!Permission::check('EDIT_SITECONFIG')) {
|
||||
$fields->makeFieldReadonly($viewersOptionsField);
|
||||
$fields->makeFieldReadonly($viewerGroupsField);
|
||||
$fields->makeFieldReadonly($editorsOptionsField);
|
||||
|
@ -889,6 +889,14 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
// Normal case
|
||||
return $this->canEdit($member);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub method to get the site config, provided so it's easy to override
|
||||
*/
|
||||
function getSiteConfig() {
|
||||
if ($this->hasMethod('alternateSiteConfig')) return $this->alternateSiteConfig();
|
||||
return SiteConfig::current_site_config();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user