mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 07:53:00 +00:00
Don't use super() when normalizing username using PAM
- We don't need the extra normalization of that function. - Also add in username_map support here. It probably isn't needed most of the time with PAM, but it keeps things consistent and is easier than documenting an exception.
This commit is contained in:
@@ -787,7 +787,9 @@ class PAMAuthenticator(LocalAuthenticator):
|
||||
import pwd
|
||||
uid = pwd.getpwnam(username).pw_uid
|
||||
username = pwd.getpwuid(uid).pw_name
|
||||
return super().normalize_username(username)
|
||||
username = self.username_map.get(username, username)
|
||||
else:
|
||||
return super().normalize_username(username)
|
||||
|
||||
class DummyAuthenticator(Authenticator):
|
||||
"""Dummy Authenticator for testing
|
||||
|
Reference in New Issue
Block a user