Projet

Général

Profil

0001-backoffice-hide-per-user-view-by-default-28101.patch

Frédéric Péters, 17 novembre 2018 12:58

Télécharger (1,61 ko)

Voir les différences:

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(-)
tests/test_backoffice_pages.py
67 67
    pub.write_cfg()
68 68
    fd = open(os.path.join(pub.app_dir, 'site-options.cfg'), 'w')
69 69
    fd.write('''
70
[options]
71
per-user-view = true
72

  
70 73
[api-secrets]
71 74
coucou = 1234
72 75
''')
wcs/backoffice/management.py
520 520
        if get_publisher().is_using_postgresql() and \
521 521
                get_publisher().get_site_option('postgresql_views') != 'false':
522 522
            r += htmltext('<li><a href="listing">%s</a></li>') % _('Global View')
523
            r += htmltext('<li><a href="users/">%s</a></li>') % _('Per User View')
523
            if get_publisher().has_site_option('per-user-view'):
524
                r += htmltext('<li><a href="users/">%s</a></li>') % _('Per User View')
524 525
            for formdef in formdefs:
525 526
                if formdef.geolocations:
526 527
                    r += htmltext('<li><a href="map">%s</a>') % _('Map View')
527
-