Implement banning

This commit is contained in:
David Hoppenbrouwers
2022-10-09 13:48:44 +02:00
parent f73f2b405c
commit eaa77d363b
5 changed files with 139 additions and 55 deletions

View File

@@ -10,7 +10,10 @@
<a class=logo href="{{ url_for('index') }}">A</a>
<div style="margin:auto"></div>
{%- if user is not none -%}
<a href="{{ url_for('user_edit') }}">{{ user.name }}</a>
<a href="{{ url_for('user_edit') }}">
{{- user.name }}
{%- if user.is_banned() %} (banned for {{ format_until(user.banned_until) }}){% endif -%}
</a>
<span> | </span>
{%- if user.is_admin() -%}
<a href="{{ url_for('admin') }}">Admin panel</a>