ref 2995. Actualizar roles.
parent
f00e5a1292
commit
1bf33e73d1
|
|
@ -25,7 +25,7 @@ resources:
|
|||
validationContext:
|
||||
groups: [ 'client:patch' ]
|
||||
ApiPlatform\Metadata\Post:
|
||||
security: 'is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_ORGANIZATIONAL_UNIT_ADMIN")'
|
||||
security: 'is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_ORGANIZATIONAL_UNIT_ADMIN") or is_granted("ROLE_ORGANIZATIONAL_UNIT_OPERATOR")'
|
||||
ApiPlatform\Metadata\Delete: ~
|
||||
|
||||
delete_multiple_clients:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ resources:
|
|||
validationContext:
|
||||
groups: ['organizational-unit:patch' ]
|
||||
ApiPlatform\Metadata\Post:
|
||||
security: 'is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_ORGANIZATIONAL_UNIT_ADMIN")'
|
||||
security: 'is_granted("ROLE_SUPER_ADMIN") or is_granted("ROLE_ORGANIZATIONAL_UNIT_ADMIN") or is_granted("ROLE_ORGANIZATIONAL_UNIT_OPERATOR")'
|
||||
ApiPlatform\Metadata\Delete:
|
||||
security: 'is_granted("ROLE_SUPER_ADMIN") or (is_granted("ROLE_ORGANIZATIONAL_UNIT_ADMIN") and object.getCreatedBy() == user.getUserIdentifier())'
|
||||
securityMessage: 'You can only delete organizational units you created.'
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ security:
|
|||
- { path: ^/validate, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/menu-browser, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/menu/, roles: PUBLIC_ACCESS }
|
||||
# Creación de clientes y OUs: solo super-admin y ou-admin
|
||||
- { path: ^/clients$, methods: [POST], roles: [ROLE_SUPER_ADMIN, ROLE_ORGANIZATIONAL_UNIT_ADMIN] }
|
||||
- { path: ^/organizational-units$, methods: [POST], roles: [ROLE_SUPER_ADMIN, ROLE_ORGANIZATIONAL_UNIT_ADMIN] }
|
||||
# Creación de clientes y OUs: super-admin, ou-admin y ou-operator
|
||||
- { path: ^/clients$, methods: [POST], roles: [ROLE_SUPER_ADMIN, ROLE_ORGANIZATIONAL_UNIT_ADMIN, ROLE_ORGANIZATIONAL_UNIT_OPERATOR] }
|
||||
- { path: ^/organizational-units$, methods: [POST], roles: [ROLE_SUPER_ADMIN, ROLE_ORGANIZATIONAL_UNIT_ADMIN, ROLE_ORGANIZATIONAL_UNIT_OPERATOR] }
|
||||
# ogLive puede consultar clientes por IP con su API key
|
||||
- { path: ^/clients, methods: [GET], roles: [ROLE_OGCLIENT_API, ROLE_USER] }
|
||||
- { path: ^/, roles: ROLE_USER }
|
||||
|
|
|
|||
Loading…
Reference in New Issue