feat : allow client to edit own tickets and protect status fields

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 20:35:11 +01:00
parent f09ef67117
commit 2a874046d3
2 changed files with 10 additions and 1 deletions

View File

@@ -36,7 +36,7 @@ use Symfony\Component\Serializer\Attribute\Groups;
processor: ClientTicketNumberProcessor::class,
),
new Patch(
security: "is_granted('ROLE_ADMIN')",
security: "is_granted('ROLE_ADMIN') or (is_granted('ROLE_CLIENT') and object.getSubmittedBy() == user)",
processor: ClientTicketStatusProcessor::class,
),
new Delete(security: "is_granted('ROLE_ADMIN')"),