From 2ed053642abfbf20678c02955b8b0bb575cf8d30 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 12 Mar 2014 12:21:41 +0100 Subject: [IMP] oaut & signup, redirect if already logged in bzr revid: fme@openerp.com-20140312112141-uvo89w4ovmzq5ozq --- addons/auth_oauth/controllers/main.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'addons/auth_oauth/controllers/main.py') diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index 53a6ffd5462..a338927c3a1 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -68,6 +68,9 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home): @http.route() def web_login(self, *args, **kw): + if request.httprequest.method == 'GET' and request.session.uid and request.params.get('redirect'): + # Redirect if already logged in and redirect param is present + return http.redirect_with_hash(request.params.get('redirect')) providers = self.list_providers() response = super(OAuthLogin, self).web_login(*args, **kw) -- cgit v1.2.3