mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-19 16:03: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,6 +787,8 @@ class PAMAuthenticator(LocalAuthenticator):
|
|||||||
import pwd
|
import pwd
|
||||||
uid = pwd.getpwnam(username).pw_uid
|
uid = pwd.getpwnam(username).pw_uid
|
||||||
username = pwd.getpwuid(uid).pw_name
|
username = pwd.getpwuid(uid).pw_name
|
||||||
|
username = self.username_map.get(username, username)
|
||||||
|
else:
|
||||||
return super().normalize_username(username)
|
return super().normalize_username(username)
|
||||||
|
|
||||||
class DummyAuthenticator(Authenticator):
|
class DummyAuthenticator(Authenticator):
|
||||||
|
Reference in New Issue
Block a user