From 329ad80596fcd9a5ed889af790dde1a78dc142eb Mon Sep 17 00:00:00 2001 From: Jake Bentvelzen Date: Thu, 14 Jul 2016 09:41:37 +1000 Subject: [PATCH] fix(Reorder): Changed $this->ID == 0 to !$this->exists() and added Controller::has_curr() check --- code/model/editableformfields/EditableFormField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/model/editableformfields/EditableFormField.php b/code/model/editableformfields/EditableFormField.php index 91977d7..ba09f5d 100755 --- a/code/model/editableformfields/EditableFormField.php +++ b/code/model/editableformfields/EditableFormField.php @@ -365,7 +365,7 @@ class EditableFormField extends DataObject { $parent = $this->Parent(); if($parent && $parent->exists()) { return $parent->canEdit($member) && !$this->isReadonly(); - } else if ($this->ID == 0) { + } else if (!$this->exists() && Controller::has_curr()) { // This is for GridFieldOrderableRows support as it checks edit permissions on // singleton of the class. Allows editing of User Defined Form pages by // 'Content Authors' and those with permission to edit the UDF page. (ie. CanEditType/EditorGroups)