[IMP] web: keep ?query on becoming superuser

Being in debug mode is necessary to become superuser (whether on the
login page or within the client), however because the becoming
endpoint would straight redirect to the _login_redirect result the
debug mode would be lost, which is commonly inconvenient.

Replace the redirect_with_hash call by local_redirect, which goes
through great pains to conserve the ?debug by default.

Task 1908202

closes odoo/odoo#29058
This commit is contained in:
Xavier Morel
2018-11-27 09:32:57 +00:00
parent 9df8e88046
commit 14ff69a46c
+1 -1
View File
@@ -525,7 +525,7 @@ class Home(http.Controller):
request.env['res.users']._invalidate_session_cache()
request.session.session_token = security.compute_session_token(request.session, request.env)
return http.redirect_with_hash(self._login_redirect(uid))
return http.local_redirect(self._login_redirect(uid), keep_hash=True)
class WebClient(http.Controller):