mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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
@ -1295,13 +1295,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
)
|
||||
//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();
|
||||
if($this->Parent()->ID || $this->CanViewType == 'Inherit') $viewersOptionsSource["Inherit"] = _t('SiteTree.INHERIT', "Inherit from parent page");
|
||||
@ -1315,6 +1308,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
$editorsOptionsSource["LoggedInUsers"] = _t('SiteTree.EDITANYONE', "Anyone who can log-in to the CMS");
|
||||
$editorsOptionsSource["OnlyTheseUsers"] = _t('SiteTree.EDITONLYTHESE', "Only these people (choose from list)");
|
||||
$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"));
|
||||
$tabMain->setTitle(_t('SiteTree.TABMAIN', "Main"));
|
||||
|
Loading…
Reference in New Issue
Block a user