From 90fc2243d33b73e3ea64cf79cebea2ab27c9a1ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 18 Sep 2018 09:59:08 +0200 Subject: [PATCH] forms: keep manager on front if ?debug=x is given (#26503) --- wcs/forms/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wcs/forms/common.py b/wcs/forms/common.py index f23bac999..b7926dbc2 100644 --- a/wcs/forms/common.py +++ b/wcs/forms/common.py @@ -228,9 +228,10 @@ class FormStatusPage(Directory, FormTemplateMixin): def _q_index(self): mine = self.check_auth() if not mine and not get_request().is_in_backoffice(): - # access authorized but the form doesn't belong to the user; if the + # Access authorized but the form doesn't belong to the user; if the # user has access to the backoffice, redirect. - if get_request().user.can_go_in_backoffice(): + # Unless ?debug=whatever is set. + if get_request().user.can_go_in_backoffice() and not get_request().form.get('debug'): return redirect(self.filled.get_url(backoffice=True)) get_logger().info('form %s - id: %s - view' % (self.formdef.name, self.filled.id)) -- 2.19.0