Button only visible for validator role.
This commit is contained in:
parent
eb7374357d
commit
6452a96921
|
@ -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
|
||||
|
||||
|
|
Reference in New Issue