def test_normal_user_cannot_update_other_users_details(
        normal_user_client: R2RClient, client: R2RClient):
    """A normal user tries to update another normal user's details."""
    # Create another normal user
    email = f"other_normal_{uuid.uuid4()}@test.com"
    password = "pwd123"
    client.users.logout()
    another_client = R2RClient(normal_user_client.base_url)
    another_client.users.create(email, password)
    another_client.users.login(email, password)
    another_user_id = another_client.users.me().results.id
    another_client.users.logout()

    # Try to update as first normal user (not superuser, not same user)
    with pytest.raises(R2RException) as exc_info:
        normal_user_client.users.update(another_user_id, name="Hacked Name")
    assert exc_info.value.status_code == 403, (
        "Non-superuser should not update another user's info.")
A normal user tries to update another normal user's details.
py/tests/integration/test_collections_users_interaction.py