|
|
@@ -16,7 +16,9 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|
|
* Security :
|
|
|
* * @see App\Security\Voter\CotisationVoter
|
|
|
*/
|
|
|
-#[ApiResource(operations: [])]
|
|
|
+#[ApiResource(operations: [
|
|
|
+ new Get(security: "is_granted('ROLE_COTISATION') and object.getOrganization().getId() == user.getOrganization().getId()")
|
|
|
+])]
|
|
|
class Cotisation implements ApiResourcesInterface
|
|
|
{
|
|
|
#[ApiProperty(identifier: true)]
|