aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2018-04-03 14:56:43 +0100
committerrubenwardy <rubenwardy@gmail.com>2018-04-03 15:01:21 +0100
commited88c61714ba62ad591d8dcbc635231f0fc0daa7 (patch)
tree6081c199a25a5eb86532a552c32f503d19901f71 /app/templates
parent5f2a3992602b59614a8c3d9a193e4669705c048c (diff)
downloadcheatdb-ed88c61714ba62ad591d8dcbc635231f0fc0daa7.tar.xz
Add ability to create packages on behalf of other users
Fixes #27
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/packages/create_edit.html3
-rw-r--r--app/templates/users/user_profile_page.html5
2 files changed, 8 insertions, 0 deletions
diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html
index a7ebdfd..0561e68 100644
--- a/app/templates/packages/create_edit.html
+++ b/app/templates/packages/create_edit.html
@@ -2,6 +2,9 @@
{% block title %}
{{ package.title or "Create Package" }}
+ {% if not package and author != current_user %}
+ for {{ author.display_name }}
+ {% endif %}
{% endblock %}
{% block content %}
diff --git a/app/templates/users/user_profile_page.html b/app/templates/users/user_profile_page.html
index 91a3b54..7e280e1 100644
--- a/app/templates/users/user_profile_page.html
+++ b/app/templates/users/user_profile_page.html
@@ -74,6 +74,11 @@
<li><i>No packages available</i></ul>
{% endfor %}
</ul>
+ {% if user == current_user or user.checkPerm(current_user, "CHANGE_AUTHOR") %}
+ <a href="{{ url_for('create_edit_package_page', author=user.username) }}">
+ Create
+ </a>
+ {% endif %}
</div>
{% if form %}