From 44e216bb849dc5564390feca2474fa71971a2b93 Mon Sep 17 00:00:00 2001 From: Adarnof Date: Tue, 8 Mar 2016 18:23:12 +0000 Subject: [PATCH] Added `hrapplications.view_apis` permission --- hrapplications/models.py | 2 +- .../registered/hrapplicationview.html | 42 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/hrapplications/models.py b/hrapplications/models.py index 815eb44e..d14d13e7 100755 --- a/hrapplications/models.py +++ b/hrapplications/models.py @@ -24,7 +24,7 @@ class HRApplication(models.Model): return self.character_name + " - Application" class Meta: - permissions = (('approve_hrapplication', 'Can approve applications'), ('reject_hrapplication', 'Can reject applications')) + permissions = (('approve_hrapplication', 'Can approve applications'), ('reject_hrapplication', 'Can reject applications'), ('view_apis', 'Can view applicant APIs'),) class HRApplicationComment(models.Model): diff --git a/stock/templates/registered/hrapplicationview.html b/stock/templates/registered/hrapplicationview.html index 3fff9a6a..5408032a 100755 --- a/stock/templates/registered/hrapplicationview.html +++ b/stock/templates/registered/hrapplicationview.html @@ -56,22 +56,24 @@ - {% for api in apis %} -
- + {% if perms.hrapplications.view_apis %} + {% for api in apis %} +
+ -
- +
+ +
-
-
- +
+ -
- -
-
- {% endfor %} +
+ +
+
+ {% endfor %} + {% endif %}
@@ -142,12 +144,14 @@
- {% for api in apis %} - - - - {% endfor %} + {% if perms.hrapplications.view_apis %} + {% for api in apis %} + + + + {% endfor %} + {% endif %} {% if perms.hrapplications.add_hrapplicationcomment %}