From 3eb7ffed1a7876687dd1e9a816c2f043da2d0092 Mon Sep 17 00:00:00 2001 From: nobohan Date: Fri, 10 Dec 2021 14:04:41 +0100 Subject: [PATCH] quick fix: use role as string in 2 functions arguments --- src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php | 2 +- src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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