mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Disable user creation by default
With firstuseauthenticator, users need to be manually created in the admin console before they can log in. This makes for a far more secure default experience.
This commit is contained in:
@@ -16,7 +16,10 @@ import yaml
|
|||||||
default = {
|
default = {
|
||||||
'auth': {
|
'auth': {
|
||||||
'type': 'firstuse',
|
'type': 'firstuse',
|
||||||
'dummy': {}
|
'dummy': {},
|
||||||
|
'firstuse': {
|
||||||
|
'createUsers': False
|
||||||
|
}
|
||||||
},
|
},
|
||||||
'users': {
|
'users': {
|
||||||
'allowed': [],
|
'allowed': [],
|
||||||
@@ -62,6 +65,7 @@ def update_auth(c, config):
|
|||||||
return
|
return
|
||||||
elif auth['type'] == 'firstuse':
|
elif auth['type'] == 'firstuse':
|
||||||
c.JupyterHub.authenticator_class = 'firstuseauthenticator.FirstUseAuthenticator'
|
c.JupyterHub.authenticator_class = 'firstuseauthenticator.FirstUseAuthenticator'
|
||||||
|
c.FirstUseAuthenticator.create_users = auth['firstuse']['createUsers']
|
||||||
|
|
||||||
|
|
||||||
def update_userlists(c, config):
|
def update_userlists(c, config):
|
||||||
|
|||||||
Reference in New Issue
Block a user