bypass ACL restriction

fix response 500 when otf create new person
This commit is contained in:
Mathieu Jaumotte 2021-09-29 13:35:33 +02:00
parent 302f60e722
commit 86c5376cc2

View File

@ -45,9 +45,9 @@ class PersonApiController extends ApiController
$person = parent::createEntity($action, $request);
// TODO temporary hack to allow creation of person with fake center
$centers = $this->authorizationHelper->getReachableCenters($this->getUser(),
/* $centers = $this->authorizationHelper->getReachableCenters($this->getUser(),
new Role(PersonVoter::CREATE));
$person->setCenter($centers[0]);
$person->setCenter($centers[0]); */
return $person;
}