mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 09:05:01 +00:00
Use service tags to inject all voters into StoredObjectVoter.php
Instead of manually injecting services into StoredObjectVoter\ config is added to automatically tag each service that implements\ StoredObjectVoterInterface.php
This commit is contained in:
@@ -4,11 +4,10 @@ services:
|
||||
autoconfigure: true
|
||||
Chill\DocStoreBundle\Security\Authorization\StoredObjectVoter:
|
||||
arguments:
|
||||
$storedObjectVoters:
|
||||
# context specific voters
|
||||
- '@accompanying_course_document_voter'
|
||||
$storedObjectVoters: !tagged_iterator stored_object_voter
|
||||
tags:
|
||||
- { name: security.voter }
|
||||
|
||||
accompanying_course_document_voter:
|
||||
class: Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter
|
||||
Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter:
|
||||
tags:
|
||||
- { name: security.voter }
|
||||
|
Reference in New Issue
Block a user