summaryrefslogtreecommitdiff
path: root/archaeological_operations/views.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-17 21:36:00 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-05-17 21:36:00 +0200
commit8523cbcc78fbd1366a256c190e2a0508d5eecee8 (patch)
treecbaf3df8199dedcb6e79682f84671340dfc65ea4 /archaeological_operations/views.py
parent098842140e78650b82e114e00382cb352e1a3936 (diff)
downloadIshtar-8523cbcc78fbd1366a256c190e2a0508d5eecee8.tar.bz2
Ishtar-8523cbcc78fbd1366a256c190e2a0508d5eecee8.zip
Document generation: check permission - test
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r--archaeological_operations/views.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py
index 545f42b89..7f77eb694 100644
--- a/archaeological_operations/views.py
+++ b/archaeological_operations/views.py
@@ -449,6 +449,10 @@ def administrativeactfile_document(
AdministrativeActTreatmentFileFormSelection
search_form = AdministrativeActTreatmentFileFormSelection
document_type = 'TF'
+
+ if not request.user.has_perm('view_administrativeact',
+ models.AdministrativeAct):
+ return HttpResponse(content_type='text/plain')
dct = {}
if request.POST:
dct['search_form'] = search_form(request.POST)