mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX prevent a nasty permissions situation where no one but an admin can edit a new page
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84000 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
7a35596c28
commit
5a7c217ea6
@ -1214,7 +1214,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
// If this is a new page, it does not have a parent, and the edit type is
|
||||
// set to inherit, change it to logged in users only (otherwise only admins
|
||||
// will be able to edit it)
|
||||
if (!$this->ID && !$this->ParentID && $this->CanEditType == 'Inherit') {
|
||||
if ($this->ID == 0 && $this->ParentID == 0 && $this->CanEditType == 'Inherit') {
|
||||
$this->CanEditType = 'LoggedInUsers';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user