add JupyterHub.admin_access

optionally allow admin users to login to user servers by visiting a special admin-only URL that sets the relevant cookie

- disabled by default
- an 'access server' button is added to the admin panel, which sets the necessary cookie to log in to the user server
This commit is contained in:
Min RK
2015-01-27 17:04:30 -08:00
parent 6dc65d55a5
commit 6b9f73ba1f
8 changed files with 72 additions and 5 deletions

View File

@@ -321,6 +321,12 @@ class JupyterHub(Application):
db = Any()
session_factory = Any()
admin_access = Bool(False, config=True,
help="""Grant admin users permission to access single-user servers.
Users should be properly informed if this is enabled.
"""
)
admin_users = Set(config=True,
help="""set of usernames of admin users
@@ -708,6 +714,7 @@ class JupyterHub(Application):
proxy=self.proxy,
hub=self.hub,
admin_users=self.admin_users,
admin_access=self.admin_access,
authenticator=self.authenticator,
spawner_class=self.spawner_class,
base_url=self.base_url,