mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
fix(Reorder): Changed $this->ID == 0 to !$this->exists() and added Controller::has_curr() check
This commit is contained in:
parent
08d173f24a
commit
329ad80596
@ -365,7 +365,7 @@ class EditableFormField extends DataObject {
|
|||||||
$parent = $this->Parent();
|
$parent = $this->Parent();
|
||||||
if($parent && $parent->exists()) {
|
if($parent && $parent->exists()) {
|
||||||
return $parent->canEdit($member) && !$this->isReadonly();
|
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
|
// This is for GridFieldOrderableRows support as it checks edit permissions on
|
||||||
// singleton of the class. Allows editing of User Defined Form pages by
|
// 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)
|
// 'Content Authors' and those with permission to edit the UDF page. (ie. CanEditType/EditorGroups)
|
||||||
|
Loading…
Reference in New Issue
Block a user