set master pwd al primo lancio - ruoli
This commit is contained in:
@@ -1,20 +1,12 @@
|
||||
{% extends 'layouts/blank.html' %} {% block content %}
|
||||
|
||||
<!-- Mostra i messaggi di errore o successo -->
|
||||
{% if messages %}
|
||||
<div>
|
||||
{% for message in messages %}
|
||||
<div class="alert {% if message.tags %}alert-{{ message.tags }}{% endif %}">
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h1>List Mosquitto Users</h1>
|
||||
<a href="{% url 'create_user' %}">
|
||||
<button class="btn btn-primary mb-3">Add User</button>
|
||||
</a>
|
||||
{% if ase_adm_group %}
|
||||
<a href="{% url 'create_user' %}">
|
||||
<button class="btn btn-primary mb-3">Add User</button>
|
||||
|
||||
</a>
|
||||
{% endif %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -29,20 +21,35 @@
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{user.site}}</td>
|
||||
<td>
|
||||
<a href="{% url 'edit_user' user.slug %}">{{user.username}}</a
|
||||
>
|
||||
<td>{% if ase_adm_group %}
|
||||
<a href="{% url 'edit_user' user.slug %}">
|
||||
{% endif %}
|
||||
{{user.username}}</a>
|
||||
</td>
|
||||
<td>{{user.client_id}}</td>
|
||||
<td>{{user.topic}}</td>
|
||||
<td id="user-status">
|
||||
{% if user.status == "enabled" %}
|
||||
<a href="{% url 'disable_user' user.slug %}">
|
||||
<button class="btn btn-danger btn-sm">Disable</button>
|
||||
<a
|
||||
{% if ase_adm_group %}
|
||||
href="{% url 'disable_user' user.slug %}"
|
||||
{% endif %}>
|
||||
<button class="btn btn-danger btn-sm"
|
||||
{% if not ase_adm_group %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>Disable</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{% url 'enable_user' user.slug %}">
|
||||
<button class="btn btn-warning btn-sm">Enable</button>
|
||||
<a
|
||||
{% if ase_adm_group %}
|
||||
href="{% url 'enable_user' user.slug %}"
|
||||
{% endif %}>
|
||||
<button class="btn btn-warning btn-sm"
|
||||
{% if not ase_adm_group %}
|
||||
disabled
|
||||
{% endif %}
|
||||
>Enable</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user