mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 06:52:59 +00:00
Implemented revision and test suite bug
This commit is contained in:
@@ -440,17 +440,17 @@ class BaseHandler(RequestHandler):
|
||||
self.raw_scopes = set()
|
||||
app_log.debug("Loading and parsing scopes")
|
||||
if not self.current_user:
|
||||
app_log.debug("No user found, no scopes loaded")
|
||||
try: # check for oauth tokens as long as #3380 not merged
|
||||
user_from_oauth = self.get_current_user_oauth_token()
|
||||
# check for oauth tokens as long as #3380 not merged
|
||||
user_from_oauth = self.get_current_user_oauth_token()
|
||||
if user_from_oauth is not None:
|
||||
self.raw_scopes = {f'read:users!user={user_from_oauth.name}'}
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
app_log.debug("No user found, no scopes loaded")
|
||||
else:
|
||||
api_token = self.get_token()
|
||||
if api_token:
|
||||
self.raw_scopes = scopes.get_scopes_for(api_token)
|
||||
elif self.current_user:
|
||||
else:
|
||||
self.raw_scopes = scopes.get_scopes_for(self.current_user)
|
||||
self.parsed_scopes = scopes.parse_scopes(self.raw_scopes)
|
||||
app_log.debug("Found scopes [%s]", ",".join(self.raw_scopes))
|
||||
|
Reference in New Issue
Block a user