From 09150a4dbb74e9fb0d9fe4bdc5ced3ac246cd0e9 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 25 Dec 2018 17:51:29 +0000 Subject: Allow users to discard their own topics --- app/templates/macros/topics.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/templates/macros/topics.html') diff --git a/app/templates/macros/topics.html b/app/templates/macros/topics.html index 8316a70..432867d 100644 --- a/app/templates/macros/topics.html +++ b/app/templates/macros/topics.html @@ -1,4 +1,4 @@ -{% macro render_topics_table(topics, show_author=True, show_discard=False) -%} +{% macro render_topics_table(topics, show_author=True, show_discard=False, current_user=current_user) -%} @@ -27,7 +27,7 @@ href="{{ url_for('create_edit_package_page', author=topic.author.username, repo=topic.getRepoURL(), forums=topic.topic_id, title=topic.title, bname=topic.name) }}"> Create - {% if show_discard %} + {% if show_discard and current_user.is_authenticated and topic.checkPerm(current_user, "TOPIC_DISCARD") %} {% if topic.discarded %} Show -- cgit v1.2.3