From bc1dd46d1042a30fd7bcd4b2245ed3369ddfff12 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 | 3 ++- wcs/templates/wcs/formdata_history.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wcs/forms/common.py b/wcs/forms/common.py index f70aee19..db087c07 100644 --- a/wcs/forms/common.py +++ b/wcs/forms/common.py @@ -273,9 +273,10 @@ class FormStatusPage(Directory, FormTemplateMixin): if not self.formdef.is_user_allowed_read_status_and_history(get_request().user, self.filled): return + display_authors = get_request().is_in_backoffice() or not get_publisher().has_site_option('hide_authors_in_form_history') return template.render( list(self.get_formdef_template_variants(self.history_templates)), - {'formdata': self.filled}) + {'formdata': self.filled, 'display_authors': display_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..9e32e865 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 display_authors %} {{evolution.get_author_name|default_if_none:""}} {% if evolution.get_author_qualification %}({{evolution.get_author_qualification}}){% endif %} -- 2.20.0.rc1