Julie Lenaerts d9e37d0958 Refactorize StoredObjectVoter.php
The StoredObjectVoter.php has been refactorized to handle context-specific voters.\
This way we can check if the context-specific voter should handle the authorization or not.\
If not, there is a simple fallback to check on the USER_ROLE.
2024-06-14 17:25:24 +02:00

15 lines
478 B
YAML

services:
_defaults:
autowire: true
autoconfigure: true
Chill\DocStoreBundle\Security\Authorization\StoredObjectVoter:
arguments:
$storedObjectVoters:
# context specific voters
- '@accompanying_course_document_voter'
tags:
- { name: security.voter }
accompanying_course_document_voter:
class: Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter