summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/controllers/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/auth_oauth/controllers/main.py')
-rw-r--r--addons/auth_oauth/controllers/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
index b6481f0ca28..6d28813507c 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -73,6 +73,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)