summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/controllers/main.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@openerp.com>2014-03-24 14:38:11 +0100
committerChristophe Simonis <chs@openerp.com>2014-03-24 14:38:11 +0100
commitd93b79e6f4e5c6c2fda65fbf88df8e1851b6fa4d (patch)
treef855bc221056bf09cd4713d6cd44ab6b1449a268 /addons/auth_oauth/controllers/main.py
parent7c4557add24726f34fec3aa834c34fa5c9b1f17f (diff)
parentf4b1d23cf2b44521456b479c1038e17d5ee0bac8 (diff)
[MERGE] forward port of branch saas-3 up to revid 9345 dle@openerp.com-20140324110349-e82t1bmmtjqbl85k
bzr revid: chs@openerp.com-20140324133811-4az1kvbznd26seow
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 22a240e310b..b4ce20d49e3 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -78,6 +78,9 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home):
@http.route()
def web_login(self, *args, **kw):
ensure_db()
+ 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)