From 9e9bf4f49323b562b50d645c05db133d4424fcf3 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Wed, 24 Oct 2018 12:10:14 +0200 Subject: [PATCH] misc: add option to exclude user names from frontoffice form history (#27119) --- wcs/forms/common.py | 4 +++- wcs/templates/wcs/formdata_history.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wcs/forms/common.py b/wcs/forms/common.py index f70aee19..e4e42147 100644 --- a/wcs/forms/common.py +++ b/wcs/forms/common.py @@ -273,9 +273,11 @@ class FormStatusPage(Directory, FormTemplateMixin): if not self.formdef.is_user_allowed_read_status_and_history(get_request().user, self.filled): return + include_authors_in_form_history = get_publisher().get_site_option('include_authors_in_form_history', 'variables') != 'False' + include_authors = get_request().is_in_backoffice() or include_authors_in_form_history return template.render( list(self.get_formdef_template_variants(self.history_templates)), - {'formdata': self.filled}) + {'formdata': self.filled, 'include_authors': include_authors}) def check_receiver(self): session = get_session() diff --git a/wcs/templates/wcs/formdata_history.html b/wcs/templates/wcs/formdata_history.html index 58f6c594..b1d31fd8 100644 --- a/wcs/templates/wcs/formdata_history.html +++ b/wcs/templates/wcs/formdata_history.html @@ -21,7 +21,7 @@ {% endif %}
- {% if evolution.who %} + {% if evolution.who and include_authors %} {{evolution.get_author_name|default_if_none:""}} {% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %} -- 2.20.0.rc1