mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #904 from Valandur/feature/fix-submittedform-cancreate
fix(submitted-form): canCreate not checking parent
This commit is contained in:
commit
a01692153c
@ -1,5 +1,7 @@
|
||||
language: php
|
||||
|
||||
dist: trusty
|
||||
|
||||
env:
|
||||
global:
|
||||
- COMPOSER_ROOT_VERSION=5.0.x-dev
|
||||
|
@ -130,7 +130,12 @@ class SubmittedForm extends DataObject
|
||||
if ($extended !== null) {
|
||||
return $extended;
|
||||
}
|
||||
return $this->Parent()->canCreate();
|
||||
|
||||
if ($this->Parent()) {
|
||||
return $this->Parent()->canCreate($member);
|
||||
}
|
||||
|
||||
return parent::canCreate($member);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user