Index: appengine/chromium_rietveld/new_static/model/user.js |
diff --git a/appengine/chromium_rietveld/new_static/model/user.js b/appengine/chromium_rietveld/new_static/model/user.js |
index 5bea9bd5a9ad2a6c6c5c8af629ab3a12b2a4b696..634d3a4996bbbd5209ccfe596266022fbd356633 100644 |
--- a/appengine/chromium_rietveld/new_static/model/user.js |
+++ b/appengine/chromium_rietveld/new_static/model/user.js |
@@ -24,6 +24,7 @@ User.ISSUES_OPEN_PATTERN = /issues created: (\d+)/; |
User.ISSUES_REVIEW_PATTERN = /issues reviewed: (\d+)/; |
User.XSRF_TOKEN_PATTERN = /xsrfToken = '([^']+)';/; |
User.LOGIN_REDIRECT_URL = "https://www.google.com/accounts/ServiceLogin?service=ah&passive=true&continue=https://appengine.google.com/_ah/conflogin%3Fcontinue%3D{1}<mpl=gm"; |
+User.LOGOUT_REDIRECT_URL = "{1}/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253D{2}"; |
User.current = null; |
User.currentPromise = null; |
@@ -77,6 +78,13 @@ User.getLoginUrl = function() |
return User.LOGIN_REDIRECT_URL.assign(encodeURIComponent(location.href)); |
}; |
+User.getLogoutUrl = function() |
+{ |
+ return User.LOGOUT_REDIRECT_URL.assign( |
+ location.origin, |
+ encodeURIComponent(location.href)); |
+}; |
+ |
User.forName = function(name, email) |
{ |
if (User.current && (name === "me" || name === User.current.name)) |