Fix validation of attachment data
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -194,7 +194,7 @@ class AttachmentService {
|
|||||||
* @throws BadRequestException
|
* @throws BadRequestException
|
||||||
*/
|
*/
|
||||||
public function create($cardId, $type, $data) {
|
public function create($cardId, $type, $data) {
|
||||||
$this->attachmentServiceValidator->check(compact('cardId', 'type', 'data'));
|
$this->attachmentServiceValidator->check(compact('cardId', 'type'));
|
||||||
|
|
||||||
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT);
|
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT);
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ class AttachmentContext implements Context {
|
|||||||
* @Given remember the last attachment as :arg1
|
* @Given remember the last attachment as :arg1
|
||||||
*/
|
*/
|
||||||
public function rememberTheLastAttachmentAs($arg1) {
|
public function rememberTheLastAttachmentAs($arg1) {
|
||||||
|
$this->requestContext->theResponseShouldHaveStatusCode(200);
|
||||||
$this->lastAttachment = $this->requestContext->getResponseBodyFromJson();
|
$this->lastAttachment = $this->requestContext->getResponseBodyFromJson();
|
||||||
$this->rememberedAttachments[$arg1] = $this->lastAttachment;
|
$this->rememberedAttachments[$arg1] = $this->lastAttachment;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user