mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Fallback permission checking
This commit is contained in:
parent
efae9a293e
commit
3ac2ac55b5
@ -446,7 +446,11 @@ class EmailRecipient extends DataObject
|
|||||||
*/
|
*/
|
||||||
public function canView($member = null)
|
public function canView($member = null)
|
||||||
{
|
{
|
||||||
return $this->Form()->canView($member);
|
if ($form = $this->Form()) {
|
||||||
|
return $form->canView($member);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::canView($member);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -456,7 +460,11 @@ class EmailRecipient extends DataObject
|
|||||||
*/
|
*/
|
||||||
public function canEdit($member = null)
|
public function canEdit($member = null)
|
||||||
{
|
{
|
||||||
return $this->Form()->canEdit($member);
|
if ($form = $this->Form()) {
|
||||||
|
return $form->canEdit($member);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parent::canEdit($member);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -469,7 +477,7 @@ class EmailRecipient extends DataObject
|
|||||||
return $this->canEdit($member);
|
return $this->canEdit($member);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Determine if this recipient may receive notifications for this submission
|
* Determine if this recipient may receive notifications for this submission
|
||||||
*
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
|
@ -39,14 +39,14 @@ use SilverStripe\UserForms\Model\EditableFormField;
|
|||||||
use SilverStripe\View\Requirements;
|
use SilverStripe\View\Requirements;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the user defined functionality to be applied to any
|
* Defines the user defined functionality to be applied to any {@link DataObject}
|
||||||
* {@link DataObject}
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
trait UserForm {
|
trait UserForm
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Built in extensions required by this page
|
* Built in extensions required by this page.
|
||||||
|
*
|
||||||
* @config
|
* @config
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user