fix activity rights (WIP)

This commit is contained in:
nobohan
2022-07-07 15:25:17 +02:00
parent 36e35f2e8f
commit 9978e76a87
5 changed files with 22 additions and 6 deletions

View File

@@ -20,6 +20,7 @@ use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Form\Type\ChillCollectionType;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\CommentType;
use Chill\MainBundle\Form\Type\PickUserDynamicType;
use Chill\MainBundle\Form\Type\PrivateCommentType;
use Chill\MainBundle\Form\Type\ScopePickerType;
use Chill\MainBundle\Form\Type\UserPickerType;
@@ -219,11 +220,9 @@ class ActivityType extends AbstractType
}
if ($activityType->isVisible('user') && $options['center']) {
$builder->add('user', UserPickerType::class, [
$builder->add('user', PickUserDynamicType::class, [
'label' => $activityType->getLabel('user'),
'required' => $activityType->isRequired('user'),
'center' => $options['center'],
'role' => $options['role'],
]);
}