fix(ogcore): restringir creacion de OUs y clientes a ou-admin y superior
El POST de OrganizationalUnit y Client queda restringido a ROLE_SUPER_ADMIN o ROLE_ORGANIZATIONAL_UNIT_ADMIN. Los operadores (ROLE_ORGANIZATIONAL_UNIT_OPERATOR) ya no pueden crear aulas ni clientes via API.pull/123/head
parent
6d35163b3f
commit
b1903ea321
|
|
@ -24,7 +24,8 @@ resources:
|
|||
provider: App\State\Provider\ClientProvider
|
||||
validationContext:
|
||||
groups: [ 'client:patch' ]
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Post:
|
||||
security: 'is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_ORGANIZATIONAL_UNIT_ADMIN")'
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
delete_multiple_clients:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ resources:
|
|||
provider: App\State\Provider\OrganizationalUnitProvider
|
||||
validationContext:
|
||||
groups: ['organizational-unit:patch' ]
|
||||
ApiPlatform\Metadata\Post: ~
|
||||
ApiPlatform\Metadata\Post:
|
||||
security: 'is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_ORGANIZATIONAL_UNIT_ADMIN")'
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
change_parent:
|
||||
class: ApiPlatform\Metadata\Post
|
||||
|
|
|
|||
Loading…
Reference in New Issue