mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
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:
parent
007348df61
commit
cc85c24bfb
@ -1467,7 +1467,7 @@ class UserDefinedForm_EmailRecipient extends DataObject {
|
||||
* @return boolean
|
||||
*/
|
||||
public function canCreate($member = null) {
|
||||
return $this->Form()->canCreate();
|
||||
return $this->Form()->canEdit();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user