diff --git a/config/api_platform/User.yaml b/config/api_platform/User.yaml index 6d39866..5e005fb 100644 --- a/config/api_platform/User.yaml +++ b/config/api_platform/User.yaml @@ -1,6 +1,5 @@ resources: App\Entity\User: - security: 'is_granted("ROLE_SUPER_ADMIN")' input: App\Dto\Input\UserInput output: App\Dto\Output\UserOutput processor: App\State\Processor\UserProcessor @@ -10,6 +9,7 @@ resources: groups: ['user:write'] operations: ApiPlatform\Metadata\GetCollection: + security: 'is_granted("ROLE_SUPER_ADMIN")' provider: App\State\Provider\UserProvider filters: - 'api_platform.filter.user.order' @@ -22,9 +22,11 @@ resources: ApiPlatform\Metadata\Patch: provider: App\State\Provider\UserProvider ApiPlatform\Metadata\Post: + security: 'is_granted("ROLE_SUPER_ADMIN")' validationContext: groups: [ 'default', 'user:post' ] - ApiPlatform\Metadata\Delete: ~ + ApiPlatform\Metadata\Delete: + security: 'is_granted("ROLE_SUPER_ADMIN")' reset_password: provider: App\State\Provider\UserProvider class: ApiPlatform\Metadata\Put