mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 11:53:12 +00:00
affiche les superuser
This commit is contained in:
parent
ad12dff8d5
commit
d2946a94b5
2 changed files with 46 additions and 4 deletions
|
@ -33,6 +33,44 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% if superuser_right %}
|
||||
<tr class="active">
|
||||
<td>Superuser</td>
|
||||
<td></td>
|
||||
<td>True</td>
|
||||
<td>
|
||||
<button class="btn btn-default" data-parent="#accordion_superuser" type="button" data-toggle="collapse" data-target="#collapseListRight_user_superuser" aria-expanded="true" aria-controls="collapseListRight_user_superuser">
|
||||
Utilisateurs ({{ superuser_right.count }})
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
Donne tous les droits sur Re2o.
|
||||
</td>
|
||||
<td class="text-right">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=5>
|
||||
<div class="panel-group" id="accordion_superuser" role="tablist" aria-multiselectable="true" style="margin-bottom: 0px;">
|
||||
<div class="panel" style="border: none;">
|
||||
<div class="panel-collapse collapse in" id="collapseListRight_user_superuser" role="tabpanel">
|
||||
<ul class="list-group" style="margin-bottom: 0px">
|
||||
{% for user in superuser_right %}
|
||||
<li class="list-group-item col-xs-12 col-sm-6 col-md-4" style="border:none;">
|
||||
{{user}}
|
||||
<a role="button" href="" title="{{ desc|default:"Supprimer" }}">
|
||||
<i class="fa fa-times" style="color:red"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endif %}
|
||||
{% for listright in listright_list %}
|
||||
<tr class="active">
|
||||
<td>
|
||||
|
|
|
@ -768,10 +768,14 @@ def index_listright(request):
|
|||
""" Affiche l'ensemble des droits"""
|
||||
listright_list = ListRight.objects.order_by('unix_name')\
|
||||
.prefetch_related('permissions').prefetch_related('user_set')
|
||||
superuser_right = User.objects.filter(is_superuser=True)
|
||||
return render(
|
||||
request,
|
||||
'users/index_listright.html',
|
||||
{'listright_list': listright_list}
|
||||
{
|
||||
'listright_list': listright_list,
|
||||
'superuser_right' : superuser_right,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue