mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Fix readonly versions of grant fields.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@78469 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
46900a9b09
commit
d558394ed5
@ -1296,13 +1296,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
//new NamedLabelField("Status", $message, "pageStatusMessage", true)
|
//new NamedLabelField("Status", $message, "pageStatusMessage", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!Permission::check('SITETREE_GRANT_ACCESS')) {
|
|
||||||
$fields->makeFieldReadonly($viewersOptionsField);
|
|
||||||
$fields->makeFieldReadonly($viewerGroupsField);
|
|
||||||
$fields->makeFieldReadonly($editorsOptionsField);
|
|
||||||
$fields->makeFieldReadonly($editorGroupsField);
|
|
||||||
}
|
|
||||||
|
|
||||||
$viewersOptionsSource = array();
|
$viewersOptionsSource = array();
|
||||||
if($this->Parent()->ID || $this->CanViewType == 'Inherit') $viewersOptionsSource["Inherit"] = _t('SiteTree.INHERIT', "Inherit from parent page");
|
if($this->Parent()->ID || $this->CanViewType == 'Inherit') $viewersOptionsSource["Inherit"] = _t('SiteTree.INHERIT', "Inherit from parent page");
|
||||||
$viewersOptionsSource["Anyone"] = _t('SiteTree.ACCESSANYONE', "Anyone");
|
$viewersOptionsSource["Anyone"] = _t('SiteTree.ACCESSANYONE', "Anyone");
|
||||||
@ -1316,6 +1309,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
$editorsOptionsSource["OnlyTheseUsers"] = _t('SiteTree.EDITONLYTHESE', "Only these people (choose from list)");
|
$editorsOptionsSource["OnlyTheseUsers"] = _t('SiteTree.EDITONLYTHESE', "Only these people (choose from list)");
|
||||||
$editorsOptionsField->setSource($editorsOptionsSource);
|
$editorsOptionsField->setSource($editorsOptionsSource);
|
||||||
|
|
||||||
|
if(!Permission::check('SITETREE_GRANT_ACCESS')) {
|
||||||
|
$fields->makeFieldReadonly($viewersOptionsField);
|
||||||
|
$fields->makeFieldReadonly($viewerGroupsField);
|
||||||
|
$fields->makeFieldReadonly($editorsOptionsField);
|
||||||
|
$fields->makeFieldReadonly($editorGroupsField);
|
||||||
|
}
|
||||||
|
|
||||||
$tabContent->setTitle(_t('SiteTree.TABCONTENT', "Content"));
|
$tabContent->setTitle(_t('SiteTree.TABCONTENT', "Content"));
|
||||||
$tabMain->setTitle(_t('SiteTree.TABMAIN', "Main"));
|
$tabMain->setTitle(_t('SiteTree.TABMAIN', "Main"));
|
||||||
$tabMeta->setTitle(_t('SiteTree.TABMETA', "Metadata"));
|
$tabMeta->setTitle(_t('SiteTree.TABMETA', "Metadata"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user