def METHOD_NAME(
    client, headers, record_w_restricted_file, users
):
    recid = record_w_restricted_file
    url = f"/records/{recid}/files"
    # Anonymous user can't upload a file
    response = client.post(url, headers=headers, json=[{"key": "test.pdf"}])
    assert response.status_code == 405
    # Different user can't upload a file
    login_user(client, users[1])
    response = client.post(url, headers=headers, json=[{"key": "test.pdf"}])
    assert response.status_code == 405
    logout_user(client)
    # Owner can't upload a file
    login_user(client, users[0])
    response = client.post(url, headers=headers, json=[{"key": "test.pdf"}])
    assert response.status_code == 405