diff options
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 |
commit | e737af50816cde844e25bea2eeeff885e5a7f763 (patch) | |
tree | cbaf3df8199dedcb6e79682f84671340dfc65ea4 /archaeological_operations/views.py | |
parent | fdb90367a6785b31042550dbd964d38ea09ebe89 (diff) | |
download | Ishtar-e737af50816cde844e25bea2eeeff885e5a7f763.tar.bz2 Ishtar-e737af50816cde844e25bea2eeeff885e5a7f763.zip |
Document generation: check permission - test
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r-- | archaeological_operations/views.py | 4 |
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) |