Gestion des permissions

This commit is contained in:
William Bouzourène 2025-01-03 16:13:41 +01:00
parent 9d25ca20df
commit 1705ac7353
6 changed files with 211 additions and 2 deletions

View file

@ -51,11 +51,35 @@
{% endif %}
</div>
{% if UserRoles %}
<div class="mb-4">
<div class="mb-3">
<b>Permissions</b>
</div>
<div style="max-width: 500px;">
<table class="table table-bordered">
<tbody>
{% for UserRole in UserRoles %}
<tr>
<td>{{ UserRole.Section.Name }}</td>
<td>{{ UserRole.Role.Name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
<div class="mt-3">
<a class="btn btn-md btn-primary" href="/admin/users/{{ User.ID }}/edit">
<i class="feather" data-feather="edit-2"></i>
Modifier
</a>
<a class="btn btn-md btn-primary" href="/admin/users/{{ User.ID }}/permissions">
<i class="feather" data-feather="lock"></i>
Permissions
</a>
{% if User.ID != Globals.UserID %}
<form