diff --git a/config/api_platform/BootServer.yaml b/config/api_platform/BootServer.yaml index 058339d..2f8d11b 100644 --- a/config/api_platform/BootServer.yaml +++ b/config/api_platform/BootServer.yaml @@ -13,17 +13,22 @@ resources: ApiPlatform\Metadata\Get: provider: App\State\Provider\BootServerProvider ApiPlatform\Metadata\Put: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\BootServerProvider ApiPlatform\Metadata\Patch: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\BootServerProvider - ApiPlatform\Metadata\Post: ~ - ApiPlatform\Metadata\Delete: ~ + ApiPlatform\Metadata\Post: + security: 'is_granted("ROLE_SUPER_ADMIN")' + ApiPlatform\Metadata\Delete: + security: 'is_granted("ROLE_SUPER_ADMIN")' oglives_sync: shortName: BootServer class: ApiPlatform\Metadata\Post method: POST input: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /boot-servers/{uuid}/oglives/sync controller: App\Controller\OgBoot\OgLive\SyncAction @@ -32,6 +37,7 @@ resources: class: ApiPlatform\Metadata\Post method: POST input: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /boot-servers/{uuid}/pxe-templates/sync controller: App\Controller\OgBoot\PxeTemplate\SyncAction diff --git a/config/api_platform/Command.yaml b/config/api_platform/Command.yaml index c89428b..eb18403 100644 --- a/config/api_platform/Command.yaml +++ b/config/api_platform/Command.yaml @@ -20,11 +20,15 @@ resources: ApiPlatform\Metadata\Get: provider: App\State\Provider\CommandProvider ApiPlatform\Metadata\Put: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\CommandProvider ApiPlatform\Metadata\Patch: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\CommandProvider - ApiPlatform\Metadata\Post: ~ - ApiPlatform\Metadata\Delete: ~ + ApiPlatform\Metadata\Post: + security: 'is_granted("ROLE_SUPER_ADMIN")' + ApiPlatform\Metadata\Delete: + security: 'is_granted("ROLE_SUPER_ADMIN")' command_execute: class: ApiPlatform\Metadata\Post diff --git a/config/api_platform/DhcpServer.yaml b/config/api_platform/DhcpServer.yaml index 2208b65..ef4d0d5 100644 --- a/config/api_platform/DhcpServer.yaml +++ b/config/api_platform/DhcpServer.yaml @@ -15,19 +15,24 @@ resources: provider: App\State\Provider\DhcpServerProvider ApiPlatform\Metadata\Put: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\DhcpServerProvider ApiPlatform\Metadata\Patch: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\DhcpServerProvider - ApiPlatform\Metadata\Post: ~ - ApiPlatform\Metadata\Delete: ~ + ApiPlatform\Metadata\Post: + security: 'is_granted("ROLE_SUPER_ADMIN")' + ApiPlatform\Metadata\Delete: + security: 'is_granted("ROLE_SUPER_ADMIN")' subnet_sync: shortName: DhcpServer class: ApiPlatform\Metadata\Post method: POST input: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /dhcp-servers/{uuid}/sync controller: App\Controller\OgDhcp\Subnet\SyncAction diff --git a/config/api_platform/ImageRepository.yaml b/config/api_platform/ImageRepository.yaml index f2cc348..ae8ba9f 100644 --- a/config/api_platform/ImageRepository.yaml +++ b/config/api_platform/ImageRepository.yaml @@ -18,11 +18,15 @@ resources: ApiPlatform\Metadata\Get: provider: App\State\Provider\ImageRepositoryProvider ApiPlatform\Metadata\Put: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\ImageRepositoryProvider ApiPlatform\Metadata\Patch: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\ImageRepositoryProvider - ApiPlatform\Metadata\Post: ~ - ApiPlatform\Metadata\Delete: ~ + ApiPlatform\Metadata\Post: + security: 'is_granted("ROLE_SUPER_ADMIN")' + ApiPlatform\Metadata\Delete: + security: 'is_granted("ROLE_SUPER_ADMIN")' image_ogrepository_sync: shortName: OgRepository Server diff --git a/config/api_platform/Subnet.yaml b/config/api_platform/Subnet.yaml index dd3e49d..77bb4a8 100644 --- a/config/api_platform/Subnet.yaml +++ b/config/api_platform/Subnet.yaml @@ -17,11 +17,15 @@ resources: ApiPlatform\Metadata\Get: provider: App\State\Provider\SubnetProvider ApiPlatform\Metadata\Put: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\SubnetProvider ApiPlatform\Metadata\Patch: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\SubnetProvider - ApiPlatform\Metadata\Post: ~ - ApiPlatform\Metadata\Delete: ~ + ApiPlatform\Metadata\Post: + security: 'is_granted("ROLE_SUPER_ADMIN")' + ApiPlatform\Metadata\Delete: + security: 'is_granted("ROLE_SUPER_ADMIN")' get_subnet: @@ -39,6 +43,7 @@ resources: class: ApiPlatform\Metadata\Post method: POST input: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /og-dhcp/server/{uuid}/post controller: App\Controller\OgDhcp\Subnet\PostAction @@ -48,6 +53,7 @@ resources: class: ApiPlatform\Metadata\Put method: PUT input: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /og-dhcp/server/{uuid}/put controller: App\Controller\OgDhcp\Subnet\PutAction @@ -57,6 +63,7 @@ resources: class: ApiPlatform\Metadata\Delete method: DELETE input: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /og-dhcp/server/{uuid}/delete controller: App\Controller\OgDhcp\Subnet\DeleteAction @@ -66,6 +73,7 @@ resources: class: ApiPlatform\Metadata\Post method: POST input: App\Dto\Input\SubnetAddHostInput + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /og-dhcp/server/{uuid}/post-host controller: App\Controller\OgDhcp\Subnet\PostHostAction @@ -84,6 +92,7 @@ resources: class: ApiPlatform\Metadata\Put method: PUT input: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /og-dhcp/server/{uuid}/put-host controller: App\Controller\OgDhcp\Subnet\PutHostAction @@ -94,6 +103,7 @@ resources: method: DELETE input: false read: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /og-dhcp/server/{uuid}/delete-host/{clientUuid} controller: App\Controller\OgDhcp\Subnet\DeleteHostAction @@ -103,6 +113,7 @@ resources: class: ApiPlatform\Metadata\Delete method: DELETE input: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /og-dhcp/server/{uuid}/delete-leases controller: App\Controller\OgDhcp\Subnet\DeleteSubnetLeasesAction @@ -113,6 +124,7 @@ resources: method: DELETE input: false read: false + security: 'is_granted("ROLE_SUPER_ADMIN")' uriTemplate: /og-dhcp/server/{uuid}/delete-lease/{clientUuid} controller: App\Controller\OgDhcp\Subnet\DeleteClientLeaseAction