|
|
@@ -17,7 +17,11 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|
|
* * @see App\Security\Voter\CotisationVoter
|
|
|
*/
|
|
|
#[ApiResource(operations: [
|
|
|
- new Get(security: "is_granted('ROLE_COTISATION') and object.getOrganization().getId() == user.getOrganization().getId()")
|
|
|
+ new Get(
|
|
|
+ uriTemplate: '/cotisations/{organizationId}',
|
|
|
+ security: 'is_granted("ROLE_COTISATION", object) and object.getOrganizationId() == user.getOrganization().getId()',
|
|
|
+ provider: CotisationProvider::class
|
|
|
+ )
|
|
|
])]
|
|
|
class Cotisation implements ApiResourcesInterface
|
|
|
{
|