From 6452a969213cc61565e9db03953e32207a3f66d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Ates?= Date: Tue, 13 Jan 2015 14:54:41 +0100 Subject: [PATCH] Button only visible for validator role. --- calebasse/dossiers/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calebasse/dossiers/views.py b/calebasse/dossiers/views.py index 59cfb4de..41591782 100644 --- a/calebasse/dossiers/views.py +++ b/calebasse/dossiers/views.py @@ -36,7 +36,7 @@ from calebasse.facturation.invoice_header import render_to_pdf_file from calebasse.decorators import validator_only -from ..utils import get_service_setting +from ..utils import get_service_setting, is_validator class NewPatientRecordView(cbv.FormView, cbv.ServiceViewMixin): form_class = forms.NewPatientRecordForm @@ -347,7 +347,7 @@ class PatientRecordAddrView(cbv.ServiceViewMixin, cbv.NotificationDisplayView, c ctx['nb_place_of_lifes'] = ctx['object'].addresses.filter(place_of_life=True).count() ctx['addresses'] = ctx['object'].addresses.order_by('-place_of_life', 'id') cv_files_path = get_service_setting('cv_files_path') - if cv_files_path and os.path.isdir(cv_files_path): + if is_validator(self.request.user) and cv_files_path and os.path.isdir(cv_files_path): ctx['cv2_reading'] = True return ctx