access.yaml 883 B

1234567891011121314151617181920212223242526272829303132
  1. App\Entity\Access\Access:
  2. collectionOperations:
  3. get: ~
  4. cget_students:
  5. method: GET
  6. path: '/students'
  7. security: 'is_granted("ROLE_USERS_VIEW")'
  8. cget_access_person_ref:
  9. method: GET
  10. path: '/access_people'
  11. normalization_context:
  12. groups: ['access_people_ref']
  13. itemOperations:
  14. get:
  15. security: '(is_granted("ROLE_USERS_VIEW") and object.getOrganization().getId() == user.getOrganization().getId()) or (object.getId() == user.getId())'
  16. get_access_address:
  17. method: GET
  18. path: '/access_addresses/{id}'
  19. requirements:
  20. id : '\d+'
  21. normalization_context:
  22. groups: ['access_address', 'address']]
  23. security: 'object.getOrganization().getId() == user.getOrganization().getId()'
  24. put:
  25. security: 'is_granted("ROLE_USERS") or (object.getId() == user.getId())'
  26. delete: ~