diff --git a/gns3server/db/repositories/users.py b/gns3server/db/repositories/users.py index 7ccb2514d..97c9fceec 100644 --- a/gns3server/db/repositories/users.py +++ b/gns3server/db/repositories/users.py @@ -41,7 +41,7 @@ def __init__(self, db_session: AsyncSession) -> None: async def get_user(self, user_id: UUID) -> Optional[models.User]: """ - Get an user by its ID. + Get a user by its ID. """ query = select(models.User).where(models.User.user_id == user_id) @@ -50,7 +50,7 @@ async def get_user(self, user_id: UUID) -> Optional[models.User]: async def get_user_by_username(self, username: str) -> Optional[models.User]: """ - Get an user by its name. + Get a user by its name. """ query = select(models.User).where(models.User.username == username) @@ -59,7 +59,7 @@ async def get_user_by_username(self, username: str) -> Optional[models.User]: async def get_user_by_email(self, email: str) -> Optional[models.User]: """ - Get an user by its email. + Get a user by its email. """ query = select(models.User).where(models.User.email == email) @@ -94,7 +94,7 @@ async def create_user(self, user: schemas.UserCreate) -> models.User: async def update_user(self, user_id: UUID, user_update: schemas.UserUpdate) -> Optional[models.User]: """ - Update an user. + Update a user. """ update_values = user_update.model_dump(exclude_unset=True) @@ -115,7 +115,7 @@ async def update_user(self, user_id: UUID, user_update: schemas.UserUpdate) -> O async def delete_user(self, user_id: UUID) -> bool: """ - Delete an user. + Delete a user. """ query = delete(models.User).where(models.User.user_id == user_id) @@ -165,7 +165,7 @@ async def get_user_memberships(self, user_id: UUID) -> List[models.UserGroup]: async def get_user_group(self, user_group_id: UUID) -> Optional[models.UserGroup]: """ - Get an user group by its ID. + Get a user group by its ID. """ query = select(models.UserGroup).where(models.UserGroup.user_group_id == user_group_id) @@ -174,7 +174,7 @@ async def get_user_group(self, user_group_id: UUID) -> Optional[models.UserGroup async def get_user_group_by_name(self, name: str) -> Optional[models.UserGroup]: """ - Get an user group by its name. + Get a user group by its name. """ query = select(models.UserGroup).where(models.UserGroup.name == name) @@ -238,7 +238,7 @@ async def add_member_to_user_group( user: models.User ) -> Union[None, models.UserGroup]: """ - Add a member to an user group. + Add a member to a user group. """ query = select(models.UserGroup).\ @@ -260,7 +260,7 @@ async def remove_member_from_user_group( user: models.User ) -> Union[None, models.UserGroup]: """ - Remove a member from an user group. + Remove a member from a user group. """ query = select(models.UserGroup).\ @@ -278,7 +278,7 @@ async def remove_member_from_user_group( async def get_user_group_members(self, user_group_id: UUID) -> List[models.User]: """ - Get all members from an user group. + Get all members from a user group. """ query = select(models.User).\ @@ -294,7 +294,7 @@ async def add_role_to_user_group( role: models.Role ) -> Union[None, models.UserGroup]: """ - Add a role to an user group. + Add a role to a user group. """ query = select(models.UserGroup).\ @@ -316,7 +316,7 @@ async def remove_role_from_user_group( role: models.Role ) -> Union[None, models.UserGroup]: """ - Remove a role from an user group. + Remove a role from a user group. """ query = select(models.UserGroup).\ @@ -334,7 +334,7 @@ async def remove_role_from_user_group( async def get_user_group_roles(self, user_group_id: UUID) -> List[models.Role]: """ - Get all roles from an user group. + Get all roles from a user group. """ query = select(models.Role). \ diff --git a/requirements.txt b/requirements.txt index 2f5dfc1bc..d9d93fb61 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,8 +3,8 @@ fastapi==0.101.0 python-multipart==0.0.6 websockets==11.0.3 aiohttp>=3.8.5,<3.9 -async-timeout==4.0.2 -aiofiles==23.1.0 +async-timeout==4.0.3 +aiofiles==23.2.1 Jinja2>=3.1.2,<3.2 sentry-sdk==1.29.2,<1.30 psutil==5.9.5 @@ -12,7 +12,7 @@ distro>=1.8.0 py-cpuinfo==9.0.0 sqlalchemy==2.0.17 aiosqlite==0.19.0 -alembic==1.11.1 +alembic==1.11.2 passlib[bcrypt]==1.7.4 python-jose==3.3.0 email-validator==2.0.0.post2