mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
API Added ability to extend permissions of SubmittedForm with an extension
This commit is contained in:
parent
32ae99112c
commit
b537e6fe0b
@ -83,6 +83,10 @@ class SubmittedForm extends DataObject {
|
||||
* @return boolean
|
||||
*/
|
||||
public function canCreate($member = null) {
|
||||
$extended = $this->extendedCan(__FUNCTION__, $member);
|
||||
if($extended !== null) {
|
||||
return $extended;
|
||||
}
|
||||
return $this->Parent()->canCreate();
|
||||
}
|
||||
|
||||
@ -92,6 +96,10 @@ class SubmittedForm extends DataObject {
|
||||
* @return boolean
|
||||
*/
|
||||
public function canView($member = null) {
|
||||
$extended = $this->extendedCan(__FUNCTION__, $member);
|
||||
if($extended !== null) {
|
||||
return $extended;
|
||||
}
|
||||
return $this->Parent()->canView();
|
||||
}
|
||||
|
||||
@ -101,6 +109,10 @@ class SubmittedForm extends DataObject {
|
||||
* @return boolean
|
||||
*/
|
||||
public function canEdit($member = null) {
|
||||
$extended = $this->extendedCan(__FUNCTION__, $member);
|
||||
if($extended !== null) {
|
||||
return $extended;
|
||||
}
|
||||
return $this->Parent()->canEdit();
|
||||
}
|
||||
|
||||
@ -110,6 +122,10 @@ class SubmittedForm extends DataObject {
|
||||
* @return boolean
|
||||
*/
|
||||
public function canDelete($member = null) {
|
||||
$extended = $this->extendedCan(__FUNCTION__, $member);
|
||||
if($extended !== null) {
|
||||
return $extended;
|
||||
}
|
||||
return $this->Parent()->canDelete();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user