quick fix: use role as string in 2 functions arguments

This commit is contained in:
nobohan 2021-12-10 14:04:41 +01:00
parent 8a4748dc2d
commit 3eb7ffed1a
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class ScopePickerType extends AbstractType
{ {
$items = $this->authorizationHelper->getReachableScopes( $items = $this->authorizationHelper->getReachableScopes(
$this->security->getUser(), $this->security->getUser(),
$options['role'], $options['role']->getRole(),
$options['center'] $options['center']
); );

View File

@ -81,7 +81,7 @@ class UserPickerType extends AbstractType
->setAllowedTypes('scope', [Scope::class, 'array', 'null']) ->setAllowedTypes('scope', [Scope::class, 'array', 'null'])
->setNormalizer('choices', function (Options $options) { ->setNormalizer('choices', function (Options $options) {
$users = $this->userACLAwareRepository $users = $this->userACLAwareRepository
->findUsersByReachedACL($options['role'], $options['center'], $options['scope'], true); ->findUsersByReachedACL($options['role']->getRole(), $options['center'], $options['scope'], true);
if (null !== $options['having_permissions_group_flag']) { if (null !== $options['having_permissions_group_flag']) {
return $this->userRepository return $this->userRepository