|
|
@@ -6,6 +6,7 @@ namespace App\Entity\Organization;
|
|
|
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
|
use ApiPlatform\Metadata\Get;
|
|
|
+use ApiPlatform\Metadata\Patch;
|
|
|
use ApiPlatform\Metadata\Put;
|
|
|
use App\Entity\Access\Access;
|
|
|
use App\Entity\Core\File;
|
|
|
@@ -34,7 +35,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|
|
new Get(
|
|
|
security: 'is_granted("ROLE_ORGANIZATION_VIEW") and object.getOrganization().getId() == user.getOrganization().getId()'
|
|
|
),
|
|
|
- new Put(
|
|
|
+ new Patch(
|
|
|
security: 'is_granted("ROLE_ORGANIZATION") and object.getOrganization().getId() == user.getOrganization().getId()'
|
|
|
),
|
|
|
],
|
|
|
@@ -50,7 +51,7 @@ class Parameters
|
|
|
#[ORM\GeneratedValue]
|
|
|
private ?int $id = null;
|
|
|
|
|
|
- #[ORM\OneToOne(targetEntity: Organization::class, mappedBy: 'parameters')]
|
|
|
+ #[ORM\OneToOne(targetEntity: Organization::class, mappedBy: 'parameters', cascade: ['persist', 'remove'])]
|
|
|
private ?Organization $organization = null;
|
|
|
|
|
|
#[ORM\Column(type: 'date', nullable: true)]
|