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

Unified Diff: appengine/components/components/template.py

Issue 2047753002: Add hack to enable multilogin. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Created 4 years, 6 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
Index: appengine/components/components/template.py
diff --git a/appengine/components/components/template.py b/appengine/components/components/template.py
index 81b4663d7869f94d65abc1025e89b7ebf36dc42d..02ba735233f4e7ce36347556f7ffdd315700828b 100644
--- a/appengine/components/components/template.py
+++ b/appengine/components/components/template.py
@@ -185,8 +185,11 @@ def _get_defaults():
"""Returns parameters used by most templates/base.html."""
account = users.get_current_user()
return {
- 'nickname': account.email() if account else None,
- 'signin_link': users.create_login_url('/') if not account else None,
+ 'nickname': account.email() if account else 'Sign in',
+ 'now': utils.utcnow(),
+ # Hack to enable multi-login.
+ 'signin_link': users.create_login_url('/').replace(
+ '/accounts/ServiceLogin', '/a/SelectSession', 1),
}

Powered by Google App Engine
This is Rietveld 408576698