diff --git a/selfprivacy_api/models/user.py b/selfprivacy_api/models/user.py index 84e246e..d35d172 100644 --- a/selfprivacy_api/models/user.py +++ b/selfprivacy_api/models/user.py @@ -14,8 +14,10 @@ class UserDataUserOrigin(Enum): class UserDataUser(BaseModel): """The user model from the userdata file""" - username: str + uuid: Optional[str] displayname: Optional[str] - ssh_keys: list[str] - origin: UserDataUserOrigin email: Optional[str] + + username: str + ssh_keys: list[str] # TODO WHY NOT OPTIONAL? + origin: UserDataUserOrigin diff --git a/selfprivacy_api/repositories/users/kanidm_user_repository.py b/selfprivacy_api/repositories/users/kanidm_user_repository.py index 1cbea39..e137af2 100644 --- a/selfprivacy_api/repositories/users/kanidm_user_repository.py +++ b/selfprivacy_api/repositories/users/kanidm_user_repository.py @@ -71,7 +71,7 @@ class KanidmUserRepository(AbstractUserRepository): user_type = UserDataUser( uuid=attrs.get("uuid", [None])[0], name=attrs.get("name", [None])[0], - ssh_keys="test", # TODO + ssh_keys=["test"], # TODO displayname=attrs.get("displayname", [None])[0], email=attrs.get("mail", [None])[0], origin=UserDataUserOrigin.NORMAL, # TODO