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/search.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'templates/packages/search.html') diff --git a/templates/packages/search.html b/templates/packages/search.html index 4a779aa0..dad05ffa 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -71,7 +71,7 @@

Package Search

- {% if user.is_authenticated %} + {% if perms.main.change_package %} {% endif %} {% for pkg in package_list %} - {% if user.is_authenticated %} + {% if perms.main.change_package %} {% endif %} @@ -134,7 +134,7 @@

Package Search

{% endif %} - {% if user.is_authenticated %} + {% if perms.main.change_package %}

 Package Search
{{ pkg.arch.name }}