From 179665e822313b5a56d262cca0cdacdc257860d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 22 Feb 2018 13:54:54 +0100 Subject: [PATCH] backoffice: hide legacy excel export behind a site option (#22026) --- wcs/backoffice/management.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcs/backoffice/management.py b/wcs/backoffice/management.py index d1250e85..a639d1b0 100644 --- a/wcs/backoffice/management.py +++ b/wcs/backoffice/management.py @@ -986,7 +986,7 @@ class FormPage(Directory): qs, _('Export a Spreadsheet')) r += htmltext('
  • %s
  • ') % ( qs, _('Export as CSV File')) - if xlwt: + if xlwt and get_publisher().has_site_option('legacy-excel-export'): r += htmltext('
  • %s
  • ') % ( qs, _('Excel Export')) if self.formdef.geolocations: @@ -1433,7 +1433,7 @@ class FormPage(Directory): def xls(self): self.check_access() - if xlwt is None: + if xlwt is None or not get_publisher().has_site_option('legacy-excel-export'): raise errors.TraversalError() fields = self.get_fields_from_query() -- 2.16.1