From ba504de32fc574a3bd958865cf679b290482693d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 17 Nov 2018 12:57:08 +0100 Subject: [PATCH] backoffice: hide per user view by default (#28101) --- tests/test_backoffice_pages.py | 3 +++ wcs/backoffice/management.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_backoffice_pages.py b/tests/test_backoffice_pages.py index 8c78ff775..3bf01c0ac 100644 --- a/tests/test_backoffice_pages.py +++ b/tests/test_backoffice_pages.py @@ -67,6 +67,9 @@ def pub(request): pub.write_cfg() fd = open(os.path.join(pub.app_dir, 'site-options.cfg'), 'w') fd.write(''' +[options] +per-user-view = true + [api-secrets] coucou = 1234 ''') diff --git a/wcs/backoffice/management.py b/wcs/backoffice/management.py index c5a445638..a9e0e72cc 100644 --- a/wcs/backoffice/management.py +++ b/wcs/backoffice/management.py @@ -520,7 +520,8 @@ class ManagementDirectory(Directory): if get_publisher().is_using_postgresql() and \ get_publisher().get_site_option('postgresql_views') != 'false': r += htmltext('
  • %s
  • ') % _('Global View') - r += htmltext('
  • %s
  • ') % _('Per User View') + if get_publisher().has_site_option('per-user-view'): + r += htmltext('
  • %s
  • ') % _('Per User View') for formdef in formdefs: if formdef.geolocations: r += htmltext('
  • %s') % _('Map View') -- 2.19.1