mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Allow adding users to specific groups
This commit is contained in:
@@ -27,6 +27,7 @@ default = {
|
||||
'allowed': [],
|
||||
'banned': [],
|
||||
'admin': [],
|
||||
'groups': {}
|
||||
},
|
||||
'limits': {
|
||||
'memory': None,
|
||||
@@ -93,6 +94,7 @@ def apply_config(config_overrides, c):
|
||||
|
||||
update_auth(c, tljh_config)
|
||||
update_userlists(c, tljh_config)
|
||||
update_usergroups(c, tljh_config)
|
||||
update_limits(c, tljh_config)
|
||||
update_user_environment(c, tljh_config)
|
||||
update_user_account_config(c, tljh_config)
|
||||
@@ -168,6 +170,14 @@ def update_userlists(c, config):
|
||||
c.Authenticator.admin_users = set(users['admin'])
|
||||
|
||||
|
||||
def update_usergroups(c, config):
|
||||
"""
|
||||
Set user groups
|
||||
"""
|
||||
users = config['users']
|
||||
c.UserCreatingSpawner.user_groups = users['groups']
|
||||
|
||||
|
||||
def update_limits(c, config):
|
||||
"""
|
||||
Set user server limits
|
||||
|
||||
Reference in New Issue
Block a user