def update_user_role(
    request: PatchRoleRequest,
    current_user: User = Depends(GetCurrentUserWithPermissions(admin=True)),
) -> User:
    """Updates a user's profile - only the role for now."""
    user = UserSensitive.get(request.user_id)
    if not user:
        raise HTTPException(status_code=404, detail=f"user {request.user_id} not found")
    user.global_role = request.role
    return user.save()
Updates a user's profile - only the role for now.
core/web/apiv2/users.py