Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1970)

Unified Diff: appengine/monorail/framework/servlet.py

Issue 1954193002: [Monorail] Implement "Switch accounts" via google.com/a/SelectSession. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebased Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/monorail/framework/servlet.py
diff --git a/appengine/monorail/framework/servlet.py b/appengine/monorail/framework/servlet.py
index e8f6e2c3d406298eba45aed16c6df2115f329d2d..d9e7ffaf41a0e63f025f7b925700f9a749bbb034 100644
--- a/appengine/monorail/framework/servlet.py
+++ b/appengine/monorail/framework/servlet.py
@@ -863,12 +863,18 @@ def _SafeCreateLoginURL(mr, continue_url=None):
"""Make a login URL w/ a detailed continue URL, otherwise use a short one."""
continue_url = continue_url or mr.current_page_url
try:
- return users.create_login_url(continue_url)
+ url = users.create_login_url(continue_url)
except users.RedirectTooLongError:
if mr.project_name:
- return users.create_login_url('/p/%s' % mr.project_name)
+ url = users.create_login_url('/p/%s' % mr.project_name)
else:
- return users.create_login_url('/')
+ url = users.create_login_url('/')
+
+ # Give the user a choice of existing accounts in their session
+ # or the option to add an account, even if they are currently
+ # signed in to exactly one account.
+ url = url.replace('/accounts/ServiceLogin', '/a/SelectSession', 1)
+ return url
def _SafeCreateLogoutURL(mr):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698