mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-30 12:46:39 +00:00
fix: add new params from kanidm repo to JsonUserRepository
This commit is contained in:
parent
0a77ac2230
commit
635c5a10e9
|
@ -64,7 +64,12 @@ class JsonUserRepository(AbstractUserRepository):
|
||||||
return users
|
return users
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_user(username: str, password: str) -> None:
|
def create_user(
|
||||||
|
username: str,
|
||||||
|
password: str,
|
||||||
|
directmemberof: Optional[list[str]] = None,
|
||||||
|
displayname: Optional[str] = None,
|
||||||
|
) -> None:
|
||||||
"""Creates a new user"""
|
"""Creates a new user"""
|
||||||
|
|
||||||
hashed_password = JsonUserRepository._check_and_hash_password(password)
|
hashed_password = JsonUserRepository._check_and_hash_password(password)
|
||||||
|
@ -104,7 +109,11 @@ class JsonUserRepository(AbstractUserRepository):
|
||||||
raise UserNotFound("User did not exist")
|
raise UserNotFound("User did not exist")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def update_user(username: str, password: str) -> None:
|
def update_user(
|
||||||
|
username: str,
|
||||||
|
password: str,
|
||||||
|
displayname: Optional[str] = None,
|
||||||
|
) -> None:
|
||||||
"""Updates the password of an existing user"""
|
"""Updates the password of an existing user"""
|
||||||
|
|
||||||
hashed_password = JsonUserRepository._check_and_hash_password(password)
|
hashed_password = JsonUserRepository._check_and_hash_password(password)
|
||||||
|
|
Loading…
Reference in a new issue