diff options
author | Dan McGee <dan@archlinux.org> | 2011-03-03 14:59:04 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-03-03 14:59:04 -0600 |
commit | 8b77efbfabfb3d65b0400e123025c02346454214 (patch) | |
tree | bd9457f27b57b9434d16ac284e4df86013469cb7 /templates/packages/search.html | |
parent | 710ec0a9de9a2185621cd7f51cdd2a056e12f999 (diff) |
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 <dan@archlinux.org>
Diffstat (limited to 'templates/packages/search.html')
-rw-r--r-- | templates/packages/search.html | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ <table class="results"> <thead> <tr> - {% if user.is_authenticated %} + {% if perms.main.change_package %} <th> </th> {% endif %} <th><a href="/packages/{% buildsortqs "arch" %}" @@ -91,7 +91,7 @@ <tbody> {% for pkg in package_list %} <tr class="{% cycle 'odd' 'even' %}"> - {% if user.is_authenticated %} + {% if perms.main.change_package %} <td><input type="checkbox" name="pkgid" value="{{ pkg.id }}" /></td> {% endif %} <td>{{ pkg.arch.name }}</td> @@ -134,7 +134,7 @@ </div> {% endif %} - {% if user.is_authenticated %} + {% if perms.main.change_package %} <p><input title="Adopt selected packages" type="submit" id="adopt-btn" name="adopt" value="Adopt Packages" /> <input title="Orphan selected packages" type="submit" id="disown-btn" |