[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:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user