From 192a1d8ac298bf97bbf5328a75adf9183848de1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 17 Jul 2017 22:05:00 +0200 Subject: [PATCH] misc: fix log visibility for users with dispatched functions (#17672) --- tests/test_backoffice_pages.py | 58 ++++++++++++++++++++++++++++++++++++++++++ wcs/formdef.py | 2 ++ 2 files changed, 60 insertions(+) diff --git a/tests/test_backoffice_pages.py b/tests/test_backoffice_pages.py index 9b4690bf..b23f7a9c 100644 --- a/tests/test_backoffice_pages.py +++ b/tests/test_backoffice_pages.py @@ -3632,3 +3632,61 @@ def test_backoffice_logged_errors(pub): FormDef.wipe() resp = resp2.click('ZeroDivisionError') assert not 'href="http://example.net/backoffice/management/test/' in resp.body + +def test_backoffice_private_status_and_history(pub): + create_user(pub) + create_environment(pub) + formdef = FormDef.get_by_urlname('form-title') + formdef.private_status_and_history = True + formdef.store() + form_class = FormDef.get_by_urlname('form-title').data_class() + number31 = [x for x in form_class.select() if x.data['1'] == 'FOO BAR 30'][0] + app = login(get_app(pub)) + resp = app.get('/backoffice/management/form-title/') + assert re.findall('', resp.body, re.DOTALL)[0].count('', resp.body, re.DOTALL)[0].count('