def METHOD_NAME(
        client, users, auth_headers_for_user, create_deposit, json_headers):
    owner, other_user = users['cms_user'], users['cms_user2']
    deposit = create_deposit(owner, 'test-analysis', publish=True)
    pid = deposit['_deposit']['id']
    permissions = [{
        'email': other_user.email,
        'type': 'user',
        'op': 'add',
        'action': 'deposit-update'
    }]
    deposit.edit_permissions(permissions)
    resp = client.post('/deposits/{}/actions/clone'.format(pid),
                       headers=auth_headers_for_user(other_user))
    assert resp.status_code == 201