mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
mlanthaler: Added permission check for edit rights and changed the labels according to Sigs suggestions.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41823 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4a0b7e1d6d
commit
be2f2243ae
@ -506,9 +506,10 @@ class SiteTree extends DataObject {
|
||||
|
||||
switch(strtolower($perm)) {
|
||||
case 'edit':
|
||||
if((($this->Editors == 'LoggedInUsers' && $member) ||
|
||||
if((Permission::check('CMS_ACCESS_CMSMain') &&
|
||||
(($this->Editors == 'LoggedInUsers' && $member) ||
|
||||
($this->Editors == 'OnlyTheseUsers' && $member &&
|
||||
$member->isInGroup($this->EditorsGroup))) == false)
|
||||
$member->isInGroup($this->EditorsGroup)))) == false)
|
||||
return false;
|
||||
break;
|
||||
|
||||
@ -1023,15 +1024,15 @@ class SiteTree extends DataObject {
|
||||
)
|
||||
),
|
||||
new Tab("Access",
|
||||
new HeaderField("Who can display this?", 2),
|
||||
new HeaderField("Who can view this page on my site?", 2),
|
||||
new OptionsetField("Viewers", "",
|
||||
array("Anyone" => "Anyone",
|
||||
"LoggedInUsers" => "Logged-in users",
|
||||
"OnlyTheseUsers" => "Only these people (choose from list)")),
|
||||
new DropdownField("ViewersGroup", "Group", Group::map()),
|
||||
new HeaderField("Who can edit this?", 2),
|
||||
new HeaderField("Who can edit this inside the CMS?", 2),
|
||||
new OptionsetField("Editors", "",
|
||||
array("LoggedInUsers" => "Logged-in users",
|
||||
array("LoggedInUsers" => "Anyone who can log-in to the CMS",
|
||||
"OnlyTheseUsers" => "Only these people (choose from list)")),
|
||||
new DropdownField("EditorsGroup", "Group", Group::map())
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user