add member role

This commit is contained in:
afornerot 2024-12-29 20:28:42 +01:00
parent 97263e96c3
commit a6ef2a4d7b
3 changed files with 5 additions and 2 deletions

View File

@ -52,6 +52,7 @@ class UserType extends AbstractType
if($options["mode"]!="profil") { if($options["mode"]!="profil") {
$choices=[]; $choices=[];
$choices['Administrateur']='ROLE_ADMIN'; $choices['Administrateur']='ROLE_ADMIN';
$choices['Membre']='ROLE_MEMBER';
$choices['Utilisateur']='ROLE_USER'; $choices['Utilisateur']='ROLE_USER';
$builder->add('roles', $builder->add('roles',

View File

@ -273,12 +273,14 @@
<div id="membre" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Membres</h1></div> <div id="membre" class="grid-item grid-item-full"><h1 class="mt-5 mb-3">Membres</h1></div>
{% for user in users %} {% for user in users %}
{% if user.hasRole('ROLE_MEMBER') %}
<div class="grid-item grid-item-size grid-item-size-15 grid-item-size-small-3 grid-item-size-noresize" style="padding:0px 5px;margin-bottom:10px;"> <div class="grid-item grid-item-size grid-item-size-15 grid-item-size-small-3 grid-item-size-noresize" style="padding:0px 5px;margin-bottom:10px;">
<a class="member" href="{{path("app_home_user",{userpseudo:user.slug})}}"> <a class="member" href="{{path("app_home_user",{userpseudo:user.slug})}}">
<img src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" class="mb-2"> <img src="/{{ appAlias }}/uploads/avatar/{{ user.avatar }}" class="mb-2">
<small>{{user.pseudo}}</small> <small>{{user.pseudo}}</small>
</a> </a>
</div> </div>
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}

View File

@ -49,8 +49,8 @@ UTILISATEURS
Administrateur<br> Administrateur<br>
{%elseif role=="ROLE_MODO" %} {%elseif role=="ROLE_MODO" %}
Modérateur<br> Modérateur<br>
{%elseif role=="ROLE_MASTER" %} {%elseif role=="ROLE_MEMBER" %}
Master<br> Membre<br>
{%elseif role=="ROLE_USER" %} {%elseif role=="ROLE_USER" %}
Utilisateur<br> Utilisateur<br>
{%endif%} {%endif%}