#resources: # App\Entity\Access\Access: # - operations: # ApiPlatform\Metadata\GetCollection: ~ # # ApiPlatform\Metadata\Get: # security: '(is_granted("ROLE_USERS_VIEW") and object.getOrganization().getId() == user.getOrganization().getId()) or (object.getId() == user.getId())' # # ApiPlatform\Metadata\Put: # security: 'is_granted("ROLE_USERS") or (object.getId() == user.getId())' # # ApiPlatform\Metadata\Delete: ~ # # - operations: # ApiPlatform\Metadata\GetCollection: # name: 'cget_students' # uriTemplate: '/students' # security: 'is_granted("ROLE_USERS_VIEW")' ## # - operations: # ApiPlatform\Metadata\Get: # name: 'get_access_address' # uriTemplate: '/access_addresses/{id}' # requirements: # id: '\d+' # normalization_context: # groups: [ 'access_address', 'address' ] ] # security: 'object.getOrganization().getId() == user.getOrganization().getId()' # # - paginationClientEnabled: true