1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Require authentication for get_user_memberships endpoint.

This commit is contained in:
grossmj 2021-05-16 17:06:23 +09:30
parent 2bf16f1e5f
commit d759564e20

View File

@ -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))