Merge pull request #7 from yuvipanda/deleteuser
Clean password db when user is deleted
This commit is contained in:
commit
1d3b95a7d7
2 changed files with 10 additions and 1 deletions
|
@ -65,3 +65,12 @@ class FirstUseAuthenticator(Authenticator):
|
|||
else:
|
||||
db[username] = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
|
||||
return username
|
||||
|
||||
def delete_user(self, user):
|
||||
"""
|
||||
When user is deleted, remove their entry from password db.
|
||||
|
||||
This lets passwords be reset by deleting users.
|
||||
"""
|
||||
with dbm.open(self.dbm_path, 'c', 0o600) as db:
|
||||
del db[user.name]
|
||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||
|
||||
setup(
|
||||
name='jupyterhub-firstuseauthenticator',
|
||||
version='0.10',
|
||||
version='0.11',
|
||||
description='JupyterHub Authenticator that lets users set passwords on first use',
|
||||
url='https://github.com/yuvipanda/jupyterhub-firstuseauthenticator',
|
||||
author='Yuvi Panda',
|
||||
|
|
Loading…
Add table
Reference in a new issue