implement admin-access with OAuth

This commit is contained in:
Min RK
2017-03-30 19:15:43 +02:00
parent ff6a68112e
commit 4bb8e47f3b
7 changed files with 18 additions and 25 deletions

View File

@@ -244,6 +244,7 @@ class User(HasTraits):
# create API and OAuth tokens
spawner.api_token = api_token
spawner.admin_access = self.settings.get('admin_access', False)
spawner.oauth_client_id = client_id = 'user-%s-%s' % (self.escaped_name, server_name)
client_store = self.settings['oauth_provider'].client_authenticator.client_store
try: