api-platform : how secure custom operation
问题 I want to know how to secure custom itemsOperation with api-platform, I found this code on documentation: /** * Secured resource. * * @ApiResource( * attributes={"access_control"="is_granted('ROLE_USER')"}, * collectionOperations={ * "get"={"method"="GET"}, * "post"={"method"="POST", "access_control"="is_granted('ROLE_ADMIN')"} * }, * itemOperations={ * "get"{"method"="GET","access_control"="is_granted('ROLE_USER') and object.owner == user"} * } * ) * @ORM\Entity */ But I want to do something