|
|
@@ -7,6 +7,7 @@ namespace App\Entity\Core;
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
|
use ApiPlatform\Metadata\Delete;
|
|
|
use ApiPlatform\Metadata\Get;
|
|
|
+use ApiPlatform\Metadata\Patch;
|
|
|
use ApiPlatform\Metadata\Post;
|
|
|
use ApiPlatform\Metadata\Put;
|
|
|
use App\Entity\AccessWish\DocumentWish;
|
|
|
@@ -27,6 +28,7 @@ use App\Enum\Core\FileTypeEnum;
|
|
|
use App\Enum\Core\FileVisibilityEnum;
|
|
|
// use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
|
|
|
use App\Repository\Core\FileRepository;
|
|
|
+use App\State\Processor\Core\FileProcessor;
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
use Doctrine\Common\Collections\Collection;
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
@@ -44,9 +46,11 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
|
|
operations: [
|
|
|
new Get(security: "is_granted('READ', object)"),
|
|
|
new Put(security: "is_granted('EDIT', object)"),
|
|
|
+ new Patch(security: "is_granted('EDIT', object)"),
|
|
|
new Post(security: "is_granted('CREATE', object)"),
|
|
|
new Delete(security: "is_granted('DELETE', object)"),
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ processor: FileProcessor::class
|
|
|
)]
|
|
|
// #[Auditable]
|
|
|
#[ORM\Entity(repositoryClass: FileRepository::class)]
|