correction bug remove all roles

This commit is contained in:
Charles 2025-10-27 16:16:22 +01:00
parent 6aacf0cefc
commit 5f50584f0d
2 changed files with 2 additions and 1 deletions

View File

@ -359,7 +359,7 @@ class UserController extends AbstractController
throw $this->createNotFoundException('Default role not found');
}
if (in_array($roleUser->getId(), $selectedRolesIds)) {
if (!empty($selectedRolesIds)) {
$this->userOrganizationAppService->syncRolesForUserOrganizationApp(
$uo,
$application,

View File

@ -15,6 +15,7 @@
<div class="card-body">
<div class="row">
{# TODO: pb avec le |raw retour à la ligne#}
{# maybe remove Description label #}
<p><b> Description : </b>{{ uoa.application.descriptionSmall|default('Aucune description disponible.')|raw }}</p>
</div>
{% if is_granted('ROLE_ADMIN') %}