mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
person document: fix use of deprecated role class
This commit is contained in:
@@ -24,7 +24,6 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
@@ -100,7 +99,7 @@ class DocumentPersonController extends AbstractController
|
||||
$document,
|
||||
[
|
||||
'center' => $document->getCenter(),
|
||||
'role' => new Role('CHILL_PERSON_DOCUMENT_UPDATE'),
|
||||
'role' => 'CHILL_PERSON_DOCUMENT_UPDATE',
|
||||
]
|
||||
);
|
||||
$form->handleRequest($request);
|
||||
@@ -160,7 +159,7 @@ class DocumentPersonController extends AbstractController
|
||||
$reachableScopes = $this->authorizationHelper
|
||||
->getReachableScopes(
|
||||
$this->getUser(),
|
||||
new Role(PersonDocumentVoter::SEE),
|
||||
PersonDocumentVoter::SEE,
|
||||
$person->getCenter()
|
||||
);
|
||||
|
||||
@@ -204,7 +203,7 @@ class DocumentPersonController extends AbstractController
|
||||
|
||||
$form = $this->createForm(PersonDocumentType::class, $document, [
|
||||
'center' => $document->getCenter(),
|
||||
'role' => new Role('CHILL_PERSON_DOCUMENT_CREATE'),
|
||||
'role' => 'CHILL_PERSON_DOCUMENT_CREATE',
|
||||
]);
|
||||
$form->handleRequest($request);
|
||||
|
||||
|
Reference in New Issue
Block a user