diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-12-25 18:15:11 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-12-25 18:15:11 +0000 |
commit | 7801be3d398162a1cefd3b8d83d3182fc6715fff (patch) | |
tree | 87fe8f5f1f23b1c3d1bf2106a505cc6302f2ba21 /app | |
parent | b10660030abf04e87c2e64f13c7b10f608e297d0 (diff) | |
download | cheatdb-7801be3d398162a1cefd3b8d83d3182fc6715fff.tar.xz |
Fix create button show logic in topic list
Diffstat (limited to 'app')
-rw-r--r-- | app/templates/macros/topics.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/templates/macros/topics.html b/app/templates/macros/topics.html index 7048f96..a6d0a42 100644 --- a/app/templates/macros/topics.html +++ b/app/templates/macros/topics.html @@ -23,7 +23,7 @@ <td>{{ topic.name or ""}}</td> <td>{{ topic.created_at | date }}</td> <td class="btn-group"> - {% if topic.author.checkPerm(current_user, "CHANGE_AUTHOR") %} + {% if current_user == topic.author or topic.author.checkPerm(current_user, "CHANGE_AUTHOR") %} <a class="btn btn-primary" 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 |