From 8b77efbfabfb3d65b0400e123025c02346454214 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 3 Mar 2011 14:59:04 -0600 Subject: Template fine-grained permissioning Rather than use user.is_authenticated, rely on certain permissions being set for the user. This allows us to open up the developer side and not assume everyone is a package maintainer. Allow all logged-in users to still view todo lists, but don't show the complete/incomplete links (only the text) unless they are allowed to mess with todo lists. Signed-off-by: Dan McGee --- templates/packages/details.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/packages/details.html') diff --git a/templates/packages/details.html b/templates/packages/details.html index ea5e528c..f73e9d7c 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -26,7 +26,7 @@

Package Actions

title="Testing package details for {{ tp.pkgname }}">{{ tp.pkgver }}-{{ tp.pkgrel }} in testing {% endif %}{% endwith %} - {% if user.is_authenticated %} + {% if perms.main.change_package %}
  • Click here to unflag
  • Click here to unflag all split packages
  • {% endif %} @@ -40,7 +40,7 @@

    Package Actions

  • Download From Mirror
  • - {% if user.is_authenticated %} + {% if perms.main.change_package %}
    {% csrf_token %}

    {% if user in pkg.maintainers %} -- cgit v1.2.3-54-g00ecf