mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-14 05:23:01 +00:00
Merge pull request #304 from minrk/rm-default-admin
Remove implicit admin of launching user
This commit is contained in:
@@ -628,10 +628,8 @@ class JupyterHub(Application):
|
|||||||
admin_users = self.authenticator.admin_users
|
admin_users = self.authenticator.admin_users
|
||||||
|
|
||||||
if not admin_users:
|
if not admin_users:
|
||||||
# add current user as admin if there aren't any others
|
self.log.warning("No admin users, admin interface will be unavailable.")
|
||||||
admins = db.query(orm.User).filter(orm.User.admin==True)
|
self.log.warning("Add any administrative users to `c.Authenticator.admin_users` in config.")
|
||||||
if admins.first() is None:
|
|
||||||
admin_users.add(getuser())
|
|
||||||
|
|
||||||
new_users = []
|
new_users = []
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user