1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-23 01:16:18 +00:00

Prevent admin user to delete itself

This commit is contained in:
Óscar García Amor 2017-08-04 10:58:47 +02:00
parent be03239f9d
commit 4c6cb3a678

View File

@ -36,8 +36,8 @@
<td>{% if session.username == user.name %}{{ user.name }}{% else %}
<a href="{{ url_for('user_profile', uid = user.id) }}">{{ user.name }}</a>{% endif %}</td>
<td>{{ user.mail }}</td><td>{{ user.admin }}</td><td>{{ user.last_play_date }}</td><td>
<a href="{{ url_for('del_user', uid = user.id) }}" aria-label="Delete user">
<span class="glyphicon glyphicon-remove-circle" aria-hidden="true" data-toggle="tooltip" data-placement="top" title="Delete user"></span></a></td></tr>
{% if session.username != user.name %}<a href="{{ url_for('del_user', uid = user.id) }}" aria-label="Delete user">
<span class="glyphicon glyphicon-remove-circle" aria-hidden="true" data-toggle="tooltip" data-placement="top" title="Delete user"></span></a>{% endif %}</td></tr>
{% endfor %}
</tbody>
</table>