mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-22 18:36:13 +01:00
[BUGFIX] Skip validation where validation makes no sense (#877)
When creating a new tea record in the FE, or when editing one, the tea model provided to the form is not necessarily valid (and we need to accept invalid models if the following action rejects the model due to a valiation error).
This commit is contained in:
parent
cda38af84b
commit
a6869c6fee
1 changed files with 6 additions and 0 deletions
|
@ -45,6 +45,9 @@ class FrontEndEditorController extends ActionController
|
||||||
return $this->context->getPropertyFromAspect('frontend.user', 'id');
|
return $this->context->getPropertyFromAspect('frontend.user', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Extbase\IgnoreValidation("tea")
|
||||||
|
*/
|
||||||
public function editAction(Tea $tea): ResponseInterface
|
public function editAction(Tea $tea): ResponseInterface
|
||||||
{
|
{
|
||||||
$this->checkIfUserIsOwner($tea);
|
$this->checkIfUserIsOwner($tea);
|
||||||
|
@ -73,6 +76,9 @@ class FrontEndEditorController extends ActionController
|
||||||
return $this->redirect('index');
|
return $this->redirect('index');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Extbase\IgnoreValidation("tea")
|
||||||
|
*/
|
||||||
public function newAction(?Tea $tea = null): ResponseInterface
|
public function newAction(?Tea $tea = null): ResponseInterface
|
||||||
{
|
{
|
||||||
// Note: We are using `makeInstance` here instead of `new` to allow for XCLASSing.
|
// Note: We are using `makeInstance` here instead of `new` to allow for XCLASSing.
|
||||||
|
|
Loading…
Reference in a new issue