remove ability to add D,E,P for non admin
authorOlivier Larchevêque <olivier.larcheveque@auf.org>
Mon, 19 Mar 2012 14:15:36 +0000 (10:15 -0400)
committerOlivier Larchevêque <olivier.larcheveque@auf.org>
Mon, 19 Mar 2012 14:15:36 +0000 (10:15 -0400)
project/rh/admin.py

index b1117fc..9434399 100644 (file)
@@ -115,6 +115,12 @@ class ProtectRegionMixin(object):
             return qs
         return qs.none()
 
+    def has_add_permission(self, request):
+        if not in_drh_or_admin(request.user):
+            return False
+        else:
+            return True
+
     def has_change_permission(self, request, obj=None):
         user_groups = request.user.groups.all()