remove current user for groups

This commit is contained in:
Valentin CZERYBA 2023-10-31 17:49:57 +01:00
parent 475c8e0ffc
commit 1286f0a3f2

View File

@ -104,7 +104,7 @@ async def delete_users_me(current_user: Annotated[users.User, Depends(users_toke
return current_user
@router.delete("/users/groups",tags=["users"])
async def delete_users_groups(current_user: Annotated[users.User, Depends(users_token.get_current_active_user)], authorize: Annotated[bool, Depends(permissions_checker.PermissionChecker(roles=["Admin", "User"]))], remove: bool = False, userids: list[str] = []):
async def delete_users_groups(authorize: Annotated[bool, Depends(permissions_checker.PermissionChecker(roles=["Admin"]))], remove: bool = False, userids: list[str] = []):
if len(userids) == 0:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,