| 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:
|
|
|