mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-14 21:43:01 +00:00
add username normalization
Handlers call `get_authenticated_user`, which in turn calls - authenticate - normalize_username - check_whitelist get_authenticated_user shouldn't need to be overridden. Normalization can be handled via overriding normalize_username.
This commit is contained in:
@@ -34,6 +34,7 @@ class UserListAPIHandler(APIHandler):
|
||||
|
||||
to_create = []
|
||||
for name in usernames:
|
||||
name = self.authenticator.normalize_username(name)
|
||||
user = self.find_user(name)
|
||||
if user is not None:
|
||||
self.log.warn("User %s already exists" % name)
|
||||
|
Reference in New Issue
Block a user