mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-17 09:14:52 +02:00
Require authentication for get_user_memberships endpoint.
This commit is contained in:
parent
2bf16f1e5f
commit
d759564e20
@ -187,7 +187,11 @@ async def get_current_active_user(current_user: schemas.User = Depends(get_curre
|
||||
return current_user
|
||||
|
||||
|
||||
@router.get("/{user_id}/groups", response_model=List[schemas.UserGroup])
|
||||
@router.get(
|
||||
"/{user_id}/groups",
|
||||
dependencies=[Depends(get_current_active_user)],
|
||||
response_model=List[schemas.UserGroup]
|
||||
)
|
||||
async def get_user_memberships(
|
||||
user_id: UUID,
|
||||
users_repo: UsersRepository = Depends(get_repository(UsersRepository))
|
||||
|
Loading…
Reference in New Issue
Block a user