From 1a956579f10aeb0ce8ff37a76525881da7ee2277 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 13 Feb 2014 08:32:05 +0100 Subject: Add closing rights (refs #1628) --- ishtar_common/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ishtar_common/views.py') diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 5fc717c9f..ba583438c 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -201,10 +201,12 @@ def get_item(model, func_name, default_name, extra_request_keys=[], # if not specific any perm is relevant (read right) if specific_perms and perm not in specific_perms: continue - if request.user.has_perm(perm): + if request.user.has_perm(perm) \ + or request.user.ishtaruser.has_right(perm): allowed = True if "_own_" not in perm: own = False + break # max right reach if not allowed: return HttpResponse(None, mimetype='text/plain') if 'type' in dct: -- cgit v1.2.3