|
|
@@ -8,6 +8,7 @@ use ApiPlatform\Metadata\Operation;
|
|
|
use ApiPlatform\Metadata\Post;
|
|
|
use ApiPlatform\Metadata\Put;
|
|
|
use ApiPlatform\State\ProcessorInterface;
|
|
|
+use App\Entity\Access\Access;
|
|
|
use App\Entity\Organization\Subdomain;
|
|
|
use App\Repository\Organization\SubdomainRepository;
|
|
|
use App\Service\Typo3\SubdomainService;
|
|
|
@@ -38,7 +39,9 @@ class SubdomainProcessor implements ProcessorInterface
|
|
|
throw new \RuntimeException('not supported', 500);
|
|
|
}
|
|
|
|
|
|
+ /** @var Access $access */
|
|
|
$access = $this->security->getUser();
|
|
|
+
|
|
|
if ($data->getOrganization()->getId() !== $access->getOrganization()->getId()) {
|
|
|
// TODO: voir à déplacer dans un voter?
|
|
|
throw new \RuntimeException('forbidden', 500);
|