diff --git a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php index 0b3642f7d..4aa8948ec 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php @@ -80,7 +80,7 @@ class ScopePickerType extends AbstractType { $items = $this->authorizationHelper->getReachableScopes( $this->security->getUser(), - $options['role'], + $options['role']->getRole(), $options['center'] ); diff --git a/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php b/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php index 9c8829dd9..0141438f6 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php @@ -81,7 +81,7 @@ class UserPickerType extends AbstractType ->setAllowedTypes('scope', [Scope::class, 'array', 'null']) ->setNormalizer('choices', function (Options $options) { $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']) { return $this->userRepository