App\Domain\User\Model\Collectivity:
    denormalizationContext:
        groups: ['collectivity_write']
    normalizationContext:
        groups: ['collectivity_read']


    collectionOperations:
        get: ~
    itemOperations:
        get:
            security: 'is_granted("ROLE_ADMIN") or object == user.getCollectivity()'

