Merge remote-tracking branch 'origin/master' into calendar/finalization

This commit is contained in:
2022-07-10 20:45:19 +02:00
25 changed files with 137 additions and 95 deletions

View File

@@ -405,7 +405,7 @@ class ExportController extends AbstractController
'alias' => $alias,
];
unset($parameters['_token']);
$key = md5(uniqid(mt_rand(), false));
$key = md5(uniqid((string) mt_rand(), false));
$this->redis->setEx($key, 3600, serialize($parameters));

View File

@@ -87,7 +87,7 @@ class ComposedRoleScopeType extends AbstractType
},
])
->add('scope', EntityType::class, [
'class' => 'ChillMainBundle:Scope',
'class' => Scope::class,
'choice_label' => static function (Scope $scope) use ($translatableStringHelper) {
return $translatableStringHelper->localize($scope->getName());
},

View File

@@ -75,14 +75,16 @@ class PickCenterType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$export = $this->exportManager->getExport($options['export_alias']);
$centers = $this->authorizationHelper->getReachableCenters(
$this->user,
$export->requiredRole()
(string) $export->requiredRole()
);
$builder->add(self::CENTERS_IDENTIFIERS, EntityType::class, [
'class' => 'ChillMainBundle:Center',
'class' => Center::class,
'query_builder' => static function (EntityRepository $er) use ($centers) {
$qb = $er->createQueryBuilder('c');
$ids = array_map(