Skip to content

Commit

Permalink
fix(Reorder): Changed $this->ID == 0 to !$this->exists() and added Co…
Browse files Browse the repository at this point in the history
…ntroller::has_curr() check
  • Loading branch information
Jake Bentvelzen committed Jul 13, 2016
1 parent 08d173f commit 329ad80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/model/editableformfields/EditableFormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public function canEdit($member = null) {
$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)
Expand Down

0 comments on commit 329ad80

Please sign in to comment.