mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: Hide readonly permission group fields on pages when not relevant,
as they are confusing. (from r88019) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89178 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a920b7689f
commit
425f5d278c
@ -1665,9 +1665,18 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
|
||||
if(!Permission::check('SITETREE_GRANT_ACCESS')) {
|
||||
$fields->makeFieldReadonly($viewersOptionsField);
|
||||
$fields->makeFieldReadonly($viewerGroupsField);
|
||||
if($this->CanViewType == 'OnlyTheseUsers') {
|
||||
$fields->makeFieldReadonly($viewerGroupsField);
|
||||
} else {
|
||||
$fields->removeByName('ViewerGroups');
|
||||
}
|
||||
|
||||
$fields->makeFieldReadonly($editorsOptionsField);
|
||||
$fields->makeFieldReadonly($editorGroupsField);
|
||||
if($this->CanEditType == 'OnlyTheseUsers') {
|
||||
$fields->makeFieldReadonly($editorGroupsField);
|
||||
} else {
|
||||
$fields->removeByName('EditorGroups');
|
||||
}
|
||||
}
|
||||
|
||||
$tabContent->setTitle(_t('SiteTree.TABCONTENT', "Content"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user