diff --git a/src/Pumukit/EncoderBundle/Document/CpuStatus.php b/src/Pumukit/EncoderBundle/Document/CpuStatus.php index 38e7d8bc7..c24818309 100644 --- a/src/Pumukit/EncoderBundle/Document/CpuStatus.php +++ b/src/Pumukit/EncoderBundle/Document/CpuStatus.php @@ -4,13 +4,14 @@ namespace Pumukit\EncoderBundle\Document; -use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use ApiPlatform\Core\Annotation\ApiResource; +use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; /** * Pumukit\EncoderBundle\Document\CpuStatus. * * @MongoDB\Document(repositoryClass="Pumukit\EncoderBundle\Repository\CpuStatusRepository") + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/EncoderBundle/Document/Job.php b/src/Pumukit/EncoderBundle/Document/Job.php index ce026dce8..5509ccc89 100644 --- a/src/Pumukit/EncoderBundle/Document/Job.php +++ b/src/Pumukit/EncoderBundle/Document/Job.php @@ -4,14 +4,15 @@ namespace Pumukit\EncoderBundle\Document; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use Symfony\Component\Validator\Constraints as Assert; -use ApiPlatform\Core\Annotation\ApiResource; /** * Pumukit\EncoderBundle\Document\Job. * * @MongoDB\Document(repositoryClass="Pumukit\EncoderBundle\Repository\JobRepository") + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/Annotation.php b/src/Pumukit/SchemaBundle/Document/Annotation.php index 879ff9de9..6b70467b4 100644 --- a/src/Pumukit/SchemaBundle/Document/Annotation.php +++ b/src/Pumukit/SchemaBundle/Document/Annotation.php @@ -4,11 +4,12 @@ namespace Pumukit\SchemaBundle\Document; -use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use ApiPlatform\Core\Annotation\ApiResource; +use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; /** * @MongoDB\Document(repositoryClass="Pumukit\SchemaBundle\Repository\AnnotationRepository") + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/Group.php b/src/Pumukit/SchemaBundle/Document/Group.php index 93a2abe27..4a45b357c 100644 --- a/src/Pumukit/SchemaBundle/Document/Group.php +++ b/src/Pumukit/SchemaBundle/Document/Group.php @@ -4,12 +4,13 @@ namespace Pumukit\SchemaBundle\Document; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use Symfony\Component\Validator\Constraints as Assert; -use ApiPlatform\Core\Annotation\ApiResource; /** * @MongoDB\Document(repositoryClass="Pumukit\SchemaBundle\Repository\GroupRepository") + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/MultimediaObject.php b/src/Pumukit/SchemaBundle/Document/MultimediaObject.php index 7f80f7085..86a4c70c6 100644 --- a/src/Pumukit/SchemaBundle/Document/MultimediaObject.php +++ b/src/Pumukit/SchemaBundle/Document/MultimediaObject.php @@ -4,16 +4,17 @@ namespace Pumukit\SchemaBundle\Document; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use Gedmo\Mapping\Annotation as Gedmo; use Pumukit\SchemaBundle\Document\ObjectValue\Immutable; -use ApiPlatform\Core\Annotation\ApiResource; /** * @MongoDB\Document(repositoryClass="Pumukit\SchemaBundle\Repository\MultimediaObjectRepository") * * @MongoDB\Index(name="text_index", keys={"textindex.text"="text", "secondarytextindex.text"="text"}, options={"language_override"="indexlanguage", "default_language"="none", "weights"={"textindex.text"=10, "secondarytextindex.text"=1}}) + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/PermissionProfile.php b/src/Pumukit/SchemaBundle/Document/PermissionProfile.php index d9f23f413..940235123 100644 --- a/src/Pumukit/SchemaBundle/Document/PermissionProfile.php +++ b/src/Pumukit/SchemaBundle/Document/PermissionProfile.php @@ -4,12 +4,13 @@ namespace Pumukit\SchemaBundle\Document; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use Gedmo\Mapping\Annotation as Gedmo; -use ApiPlatform\Core\Annotation\ApiResource; /** * @MongoDB\Document(repositoryClass="Pumukit\SchemaBundle\Repository\PermissionProfileRepository") + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/Person.php b/src/Pumukit/SchemaBundle/Document/Person.php index db5fd669b..4ba6b8c0b 100644 --- a/src/Pumukit/SchemaBundle/Document/Person.php +++ b/src/Pumukit/SchemaBundle/Document/Person.php @@ -4,12 +4,13 @@ namespace Pumukit\SchemaBundle\Document; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use Symfony\Component\Validator\Constraints as Assert; -use ApiPlatform\Core\Annotation\ApiResource; /** * @MongoDB\Document(repositoryClass="Pumukit\SchemaBundle\Repository\PersonRepository") + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/Role.php b/src/Pumukit/SchemaBundle/Document/Role.php index 0ed9cad7d..6b4fc93b7 100644 --- a/src/Pumukit/SchemaBundle/Document/Role.php +++ b/src/Pumukit/SchemaBundle/Document/Role.php @@ -4,12 +4,13 @@ namespace Pumukit\SchemaBundle\Document; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use Gedmo\Mapping\Annotation as Gedmo; -use ApiPlatform\Core\Annotation\ApiResource; /** * @MongoDB\Document(repositoryClass="Pumukit\SchemaBundle\Repository\RoleRepository") + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/Series.php b/src/Pumukit/SchemaBundle/Document/Series.php index 9975b63d8..99f638364 100644 --- a/src/Pumukit/SchemaBundle/Document/Series.php +++ b/src/Pumukit/SchemaBundle/Document/Series.php @@ -4,14 +4,15 @@ namespace Pumukit\SchemaBundle\Document; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use JMS\Serializer\Annotation as Serializer; -use ApiPlatform\Core\Annotation\ApiResource; /** * @MongoDB\Document(repositoryClass="Pumukit\SchemaBundle\Repository\SeriesRepository") * * @MongoDB\Index(name="text_index", keys={"textindex.text"="text", "secondarytextindex.text"="text"}, options={"language_override"="indexlanguage", "default_language"="none", "weights"={"textindex.text"=10, "secondarytextindex.text"=1}}) + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/Tag.php b/src/Pumukit/SchemaBundle/Document/Tag.php index 51e96869e..211e808ae 100644 --- a/src/Pumukit/SchemaBundle/Document/Tag.php +++ b/src/Pumukit/SchemaBundle/Document/Tag.php @@ -4,15 +4,16 @@ namespace Pumukit\SchemaBundle\Document; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use Gedmo\Mapping\Annotation as Gedmo; use Symfony\Component\Validator\Constraints as Assert; -use ApiPlatform\Core\Annotation\ApiResource; /** * @MongoDB\Document(repositoryClass="Gedmo\Tree\Document\MongoDB\Repository\MaterializedPathRepository") * * @Gedmo\Tree(type="materializedPath", activateLocking=false) + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}} diff --git a/src/Pumukit/SchemaBundle/Document/User.php b/src/Pumukit/SchemaBundle/Document/User.php index 46b3d9675..fe46334fe 100644 --- a/src/Pumukit/SchemaBundle/Document/User.php +++ b/src/Pumukit/SchemaBundle/Document/User.php @@ -4,17 +4,16 @@ namespace Pumukit\SchemaBundle\Document; -use ApiPlatform\Core\Annotation\ApiFilter; +use ApiPlatform\Core\Annotation\ApiResource; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use MongoDB\BSON\ObjectId; use Symfony\Component\Security\Core\User\UserInterface; -use ApiPlatform\Core\Annotation\ApiResource; use Symfony\Component\Serializer\Annotation\Ignore; - /** * @MongoDB\Document(repositoryClass="Pumukit\SchemaBundle\Repository\UserRepository") + * * @ApiResource( * collectionOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}, * itemOperations={"get"={"method"="GET", "access_control"="is_granted('ROLE_ACCESS_API')"}}