0001-backoffice-hide-per-user-view-by-default-28101.patch
tests/test_backoffice_pages.py | ||
---|---|---|
3070 | 3070 |
user = create_user(pub) |
3071 | 3071 |
create_environment(pub) |
3072 | 3072 |
app = login(get_app(pub)) |
3073 |
resp = app.get('/backoffice/management/').follow() |
|
3074 |
assert 'Per User View' not in resp.body |
|
3075 | ||
3076 |
if not pub.site_options.has_section('options'): |
|
3077 |
pub.site_options.add_section('options') |
|
3078 |
pub.site_options.set('options', 'per-user-view', 'true') |
|
3079 |
fd = open(os.path.join(pub.app_dir, 'site-options.cfg'), 'w') |
|
3080 |
pub.site_options.write(fd) |
|
3081 |
fd.close() |
|
3082 | ||
3073 | 3083 |
resp = app.get('/backoffice/management/').follow() |
3074 | 3084 |
assert 'Per User View' in resp.body |
3075 | 3085 |
resp = resp.click(' User View') |
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 |
- |