From aad62f25995f183df30f2d819a1b10769ac5917e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 28 Jan 2024 19:53:33 +0100 Subject: [PATCH] Disable POST operations for Attachment and AbstractParameter groups for now, as they can not work properly As they work on abstract classes, they can not be initialized directly currently and you need to create them via a PATCH operation on their owning elements. --- src/Entity/Attachments/Attachment.php | 2 +- src/Entity/Parameters/AbstractParameter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entity/Attachments/Attachment.php b/src/Entity/Attachments/Attachment.php index 4e02e5db..72075c42 100644 --- a/src/Entity/Attachments/Attachment.php +++ b/src/Entity/Attachments/Attachment.php @@ -72,7 +72,7 @@ use LogicException; operations: [ new Get(security: 'is_granted("read", object)'), new GetCollection(security: 'is_granted("@attachments.list_attachments")'), - new Post(securityPostDenormalize: 'is_granted("create", object)'), + //new Post(securityPostDenormalize: 'is_granted("create", object)'), new Patch(security: 'is_granted("edit", object)'), new Delete(security: 'is_granted("delete", object)'), ], diff --git a/src/Entity/Parameters/AbstractParameter.php b/src/Entity/Parameters/AbstractParameter.php index 015e496d..ebdbd777 100644 --- a/src/Entity/Parameters/AbstractParameter.php +++ b/src/Entity/Parameters/AbstractParameter.php @@ -82,7 +82,7 @@ use function sprintf; shortName: 'Parameter', operations: [ new Get(security: 'is_granted("read", object)'), - new Post(securityPostDenormalize: 'is_granted("create", object)'), + //new Post(securityPostDenormalize: 'is_granted("create", object)'), new Patch(security: 'is_granted("edit", object)'), new Delete(security: 'is_granted("delete", object)'), ],