mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 07:23:00 +00:00
issue-3772: populating user_options from orm_spawner
This commit is contained in:
@@ -201,7 +201,7 @@ class APIHandler(BaseHandler):
|
|||||||
'pending': spawner.pending,
|
'pending': spawner.pending,
|
||||||
'ready': spawner.ready,
|
'ready': spawner.ready,
|
||||||
'url': url_path_join(spawner.user.url, spawner.name, '/'),
|
'url': url_path_join(spawner.user.url, spawner.name, '/'),
|
||||||
'user_options': spawner.orm_spawner.user_options,
|
'user_options': spawner.user_options,
|
||||||
'progress_url': spawner._progress_url,
|
'progress_url': spawner._progress_url,
|
||||||
}
|
}
|
||||||
scope_filter = self.get_scope_filter('admin:server_state')
|
scope_filter = self.get_scope_filter('admin:server_state')
|
||||||
|
@@ -376,6 +376,7 @@ class User:
|
|||||||
oauth_client_id=client_id,
|
oauth_client_id=client_id,
|
||||||
cookie_options=self.settings.get('cookie_options', {}),
|
cookie_options=self.settings.get('cookie_options', {}),
|
||||||
trusted_alt_names=trusted_alt_names,
|
trusted_alt_names=trusted_alt_names,
|
||||||
|
user_options=orm_spawner.user_options or {},
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.settings.get('internal_ssl'):
|
if self.settings.get('internal_ssl'):
|
||||||
@@ -600,7 +601,7 @@ class User:
|
|||||||
spawner.handler = handler
|
spawner.handler = handler
|
||||||
|
|
||||||
# Passing user_options to the spawner
|
# Passing user_options to the spawner
|
||||||
if options is None:
|
if options is None or options is {}:
|
||||||
# options unspecified, load from db which should have the previous value
|
# options unspecified, load from db which should have the previous value
|
||||||
options = spawner.orm_spawner.user_options or {}
|
options = spawner.orm_spawner.user_options or {}
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user