Fixes #270: can't add Email Recipients

For canCreate() on UserDefinedForm_EmailRecipient, check whether the user can Edit the Form(), not Create.  Form()-canCreate() check will only return true if the user is ADMIN or can create pages at the Top Level.  Checking for Form()->canEdit() makes sense, since adding
Email Recipients is an edit to the functionality of the form.
This commit is contained in:
Ian Walls 2015-07-30 10:22:56 -04:00
parent 007348df61
commit cc85c24bfb

View File

@ -1467,7 +1467,7 @@ class UserDefinedForm_EmailRecipient extends DataObject {
* @return boolean
*/
public function canCreate($member = null) {
return $this->Form()->canCreate();
return $this->Form()->canEdit();
}
/**