[ckan-dev] harvest actions NotAuthorized

Matthew Fullerton matthew at smartlane.de
Tue Feb 24 09:21:53 UTC 2015


Well, there is this suspicious comment:
https://github.com/ckan/ckanext-harvest/blob/a71cc495fb5413499ee3caf023cda63940effffd/ckanext/harvest/harvesters/base.py#L139

Maybe try a sysadmin user 'harvest' just to be sure?

-Matt



On 5 February 2015 at 13:12, Ivan Ricotti <i.ricotti at hyperborea.com> wrote:
> Hello,
>
> I installed the ckan-harvest plugin.
>
> Any command from CLI returns this error:
>
> (default)root at rt-open-vm02-p1:/usr/lib/ckan/default/src# paster
> --plugin=ckanext-harvest harvester run
> --config=/etc/ckan/default/production.ini
> 2015-02-05 13:09:05,765 DEBUG [ckanext.harvest.model] Harvest tables
> defined in memory
> 2015-02-05 13:09:05,767 DEBUG [ckanext.harvest.model] Harvest tables
> already exist
>
> 2015-02-05 13:09:05,807 INFO  [ckanext.harvest.logic.action.update]
> Harvest job run: {}
> Traceback (most recent call last):
>   File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
>     load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
>   File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
> line 104, in run
>     invoke(command, command_name, options, args[1:])
>   File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
> line 143, in invoke
>     exit_code = runner.run(args)
>   File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
> line 238, in run
>     result = self.command()
>   File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/commands/harvester.py",
> line 122, in command
>     self.run_harvester()
>   File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/commands/harvester.py",
> line 287, in run_harvester
>     jobs = get_action('harvest_jobs_run')(context,{})
>   File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line
> 421, in wrapped
>     result = _action(context, data_dict, **kw)
>   File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/logic/action/update.py",
> line 292, in harvest_jobs_run
>     check_access('harvest_jobs_run',context,data_dict)
>   File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line
> 292, in check_access
>     raise NotAuthorized(msg)
> ckan.logic.NotAuthorized
>
> Even just a sources list, non only the run command.
>
> I debbuged the code. The user that is being retrievied from the
> get_site_user method is "default", which is a CKAN sysadm user.
>
> Any suggestion?
>
> Thanks in advance.
> Ivan
>
> --
> Ing. Ivan Ricotti
> ---------------------------------------------
> Hyperborea s.r.l.
> c/o Polo Scientifico e Tecnologico
> Via Giuntini 25, 56023 Navacchio (PI) - Italy
> phone: +39.050.754241
> fax: +39.050.754240
> e-mail: i.ricotti at hyperborea.com
> web: http://www.hyperborea.com
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev

Projekt SMARTLANE

matthew at smartlane.de
T +49.89.289.28575
F +49.89.289.22333
www.smartlane.de

EXIST-Gründungsvorhaben „Tapestry“
c/o Lehrstuhl für Verkehrstechnik
Technische Universität München
Arcisstraße 21
80333 München



More information about the ckan-dev mailing list