fix(security) : allow ROLE_CLIENT to read projects

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 21:39:41 +01:00
parent 1f31a3a33f
commit cd8cea45c1

View File

@@ -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']],