diff --git a/ckanext/harvest/logic/auth/create.py b/ckanext/harvest/logic/auth/create.py index 2ee2ae0b3..e2bdaf469 100644 --- a/ckanext/harvest/logic/auth/create.py +++ b/ckanext/harvest/logic/auth/create.py @@ -35,7 +35,7 @@ def harvest_job_create(context, data_dict): context['package'] = pkg try: - pt.check_access('package_update', context, data_dict) + pt.check_access('package_update', context, {"id": source_id}) return {'success': True} except pt.NotAuthorized: return {'success': False, diff --git a/ckanext/harvest/tests/harvesters/test_base.py b/ckanext/harvest/tests/harvesters/test_base.py index f260e4445..b7d5a810f 100644 --- a/ckanext/harvest/tests/harvesters/test_base.py +++ b/ckanext/harvest/tests/harvesters/test_base.py @@ -13,7 +13,7 @@ _ensure_name_is_unique = HarvesterBase._ensure_name_is_unique -@pytest.mark.usefixtures('clean_db', 'clean_index') +@pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') class TestGenNewName(object): def test_basic(self): @@ -51,7 +51,7 @@ def test_config_override(self): assert HarvesterBase._gen_new_name('Trees', append_type='number-sequence') == 'trees1' -@pytest.mark.usefixtures('clean_db', 'clean_index') +@pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') class TestEnsureNameIsUnique(object): def test_no_existing_datasets(self): diff --git a/ckanext/harvest/tests/test_blueprint.py b/ckanext/harvest/tests/test_blueprint.py index d82c04d93..fde7b2292 100644 --- a/ckanext/harvest/tests/test_blueprint.py +++ b/ckanext/harvest/tests/test_blueprint.py @@ -5,7 +5,7 @@ from ckanext.harvest.tests import factories as harvest_factories -@pytest.mark.usefixtures('clean_db', 'clean_index') +@pytest.mark.usefixtures('with_plugins', 'clean_db', 'clean_index') class TestBlueprint(): def test_index_page_is_rendered(self, app):