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

Unified Diff: dashboard/dashboard/api/oauth.py

Issue 2960873002: WIP - Pinpoint - New Page.
Patch Set: . Created 3 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
« no previous file with comments | « dashboard/app.yaml ('k') | dashboard/dashboard/dispatcher.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/api/oauth.py
diff --git a/dashboard/dashboard/api/oauth.py b/dashboard/dashboard/api/oauth.py
index 999731be054eba12006120f94e475d5729a40c3b..096198aa19e17983b8e0fa03b3e20987e973bd95 100644
--- a/dashboard/dashboard/api/oauth.py
+++ b/dashboard/dashboard/api/oauth.py
@@ -5,6 +5,7 @@ import functools
import logging
from google.appengine.api import oauth
+from google.appengine.api import users
from dashboard.common import datastore_hooks
from dashboard.common import utils
@@ -30,8 +31,10 @@ class NotLoggedInError(Exception):
def Authorize(function_to_wrap):
@functools.wraps(function_to_wrap)
def Wrapper(*args, **kwargs):
+ logging.info('CHECKING USER IN DECORATOR')
try:
user = oauth.get_current_user(OAUTH_SCOPES)
+ logging.info('USER: %s' % str(user))
if user and not user.email().endswith('.gserviceaccount.com'):
# For non-service account, need to verify that the OAuth client ID
# is in our whitelist.
@@ -42,6 +45,7 @@ def Authorize(function_to_wrap):
user = None
raise OAuthError
except oauth.Error:
+ logging.info('NO OAUTH USER')
raise OAuthError
if not user:
« no previous file with comments | « dashboard/app.yaml ('k') | dashboard/dashboard/dispatcher.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698