From cd8cea45c1eec7f05a84e2f6994dc68e83adff9c Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 15 Mar 2026 21:39:41 +0100 Subject: [PATCH] fix(security) : allow ROLE_CLIENT to read projects Co-Authored-By: Claude Opus 4.6 (1M context) --- src/Entity/Project.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entity/Project.php b/src/Entity/Project.php index 74e5fa8..7e62b9f 100644 --- a/src/Entity/Project.php +++ b/src/Entity/Project.php @@ -20,8 +20,8 @@ use Symfony\Component\Validator\Constraints as Assert; #[ApiResource( operations: [ - new GetCollection(security: "is_granted('ROLE_USER')"), - new Get(security: "is_granted('ROLE_USER')"), + new GetCollection(security: "is_granted('ROLE_USER') or is_granted('ROLE_CLIENT')"), + new Get(security: "is_granted('ROLE_USER') or is_granted('ROLE_CLIENT')"), new Post( security: "is_granted('ROLE_ADMIN')", denormalizationContext: ['groups' => ['project:write', 'project:create']],