Implement banning
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
{%- if comment.parent_id is not none -%}
|
||||
<a href="{{ url_for('comment', comment_id = comment.parent_id) }}#"> parent</a>
|
||||
{%- endif -%}
|
||||
{%- if user is not none and (comment.author_id == user.id or user.is_moderator()) -%}
|
||||
{%- if user is not none and (comment.author_id == user.id or user.is_moderator()) and not user.is_banned() -%}
|
||||
<a href="{{ url_for('edit_comment', comment_id = comment.id) }}"> edit</a>
|
||||
{%- if can_delete -%}
|
||||
<a href="{{ url_for('confirm_delete_comment', comment_id = comment.id) }}"> delete</a>
|
||||
@@ -22,7 +22,7 @@
|
||||
{%- macro thread_author(author_id, name, ctime, mtime) -%}
|
||||
<p><sub>
|
||||
{{- author(author_id, name, ctime, mtime) -}}
|
||||
{%- if user is not none and (author_id == user.id or user.is_moderator()) -%}
|
||||
{%- if user is not none and (author_id == user.id or user.is_moderator()) and not user.is_banned() -%}
|
||||
<a href="{{ url_for('edit_thread', thread_id = thread_id) }}"> edit</a>
|
||||
<a href="{{ url_for('confirm_delete_thread', thread_id = thread_id) }}"> delete</a>
|
||||
{%- endif -%}
|
||||
@@ -49,7 +49,7 @@
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro reply() -%}
|
||||
{%- if user is not none -%}
|
||||
{%- if user is not none and not user.is_banned() -%}
|
||||
<form method="post" action="comment/">
|
||||
<p><textarea name="text"></textarea></p>
|
||||
<p><input type="submit" value="Post comment"></p>
|
||||
|
||||
Reference in New Issue
Block a user