mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-12 17:10:55 +00:00
Upgrade dependencies
This commit is contained in:
parent
cefa459721
commit
b0657b39ef
@ -41,7 +41,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def get_user(self, user_id: UUID) -> Optional[models.User]:
|
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)
|
query = select(models.User).where(models.User.user_id == user_id)
|
||||||
@ -50,7 +50,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def get_user_by_username(self, username: str) -> 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)
|
query = select(models.User).where(models.User.username == username)
|
||||||
@ -59,7 +59,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def get_user_by_email(self, email: 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)
|
query = select(models.User).where(models.User.email == email)
|
||||||
@ -94,7 +94,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def update_user(self, user_id: UUID, user_update: schemas.UserUpdate) -> Optional[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)
|
update_values = user_update.model_dump(exclude_unset=True)
|
||||||
@ -115,7 +115,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def delete_user(self, user_id: UUID) -> bool:
|
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)
|
query = delete(models.User).where(models.User.user_id == user_id)
|
||||||
@ -165,7 +165,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def get_user_group(self, user_group_id: UUID) -> Optional[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)
|
query = select(models.UserGroup).where(models.UserGroup.user_group_id == user_group_id)
|
||||||
@ -174,7 +174,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def get_user_group_by_name(self, name: str) -> 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)
|
query = select(models.UserGroup).where(models.UserGroup.name == name)
|
||||||
@ -238,7 +238,7 @@ class UsersRepository(BaseRepository):
|
|||||||
user: models.User
|
user: models.User
|
||||||
) -> Union[None, models.UserGroup]:
|
) -> Union[None, models.UserGroup]:
|
||||||
"""
|
"""
|
||||||
Add a member to an user group.
|
Add a member to a user group.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
query = select(models.UserGroup).\
|
query = select(models.UserGroup).\
|
||||||
@ -260,7 +260,7 @@ class UsersRepository(BaseRepository):
|
|||||||
user: models.User
|
user: models.User
|
||||||
) -> Union[None, models.UserGroup]:
|
) -> Union[None, models.UserGroup]:
|
||||||
"""
|
"""
|
||||||
Remove a member from an user group.
|
Remove a member from a user group.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
query = select(models.UserGroup).\
|
query = select(models.UserGroup).\
|
||||||
@ -278,7 +278,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def get_user_group_members(self, user_group_id: UUID) -> List[models.User]:
|
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).\
|
query = select(models.User).\
|
||||||
@ -294,7 +294,7 @@ class UsersRepository(BaseRepository):
|
|||||||
role: models.Role
|
role: models.Role
|
||||||
) -> Union[None, models.UserGroup]:
|
) -> Union[None, models.UserGroup]:
|
||||||
"""
|
"""
|
||||||
Add a role to an user group.
|
Add a role to a user group.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
query = select(models.UserGroup).\
|
query = select(models.UserGroup).\
|
||||||
@ -316,7 +316,7 @@ class UsersRepository(BaseRepository):
|
|||||||
role: models.Role
|
role: models.Role
|
||||||
) -> Union[None, models.UserGroup]:
|
) -> Union[None, models.UserGroup]:
|
||||||
"""
|
"""
|
||||||
Remove a role from an user group.
|
Remove a role from a user group.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
query = select(models.UserGroup).\
|
query = select(models.UserGroup).\
|
||||||
@ -334,7 +334,7 @@ class UsersRepository(BaseRepository):
|
|||||||
|
|
||||||
async def get_user_group_roles(self, user_group_id: UUID) -> List[models.Role]:
|
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). \
|
query = select(models.Role). \
|
||||||
|
@ -3,8 +3,8 @@ fastapi==0.101.0
|
|||||||
python-multipart==0.0.6
|
python-multipart==0.0.6
|
||||||
websockets==11.0.3
|
websockets==11.0.3
|
||||||
aiohttp>=3.8.5,<3.9
|
aiohttp>=3.8.5,<3.9
|
||||||
async-timeout==4.0.2
|
async-timeout==4.0.3
|
||||||
aiofiles==23.1.0
|
aiofiles==23.2.1
|
||||||
Jinja2>=3.1.2,<3.2
|
Jinja2>=3.1.2,<3.2
|
||||||
sentry-sdk==1.29.2,<1.30
|
sentry-sdk==1.29.2,<1.30
|
||||||
psutil==5.9.5
|
psutil==5.9.5
|
||||||
@ -12,7 +12,7 @@ distro>=1.8.0
|
|||||||
py-cpuinfo==9.0.0
|
py-cpuinfo==9.0.0
|
||||||
sqlalchemy==2.0.17
|
sqlalchemy==2.0.17
|
||||||
aiosqlite==0.19.0
|
aiosqlite==0.19.0
|
||||||
alembic==1.11.1
|
alembic==1.11.2
|
||||||
passlib[bcrypt]==1.7.4
|
passlib[bcrypt]==1.7.4
|
||||||
python-jose==3.3.0
|
python-jose==3.3.0
|
||||||
email-validator==2.0.0.post2
|
email-validator==2.0.0.post2
|
||||||
|
Loading…
Reference in New Issue
Block a user