[ckan-dev] Ckan Harvester extension: ckan.logic.NotAuthorized

Dave Caraway dave at fogmine.com
Tue Aug 13 17:27:04 UTC 2013


Hi all,

I'm not able to get sources into the ckan harvester. Has anyone seen this
error before: ckan.logic.NotAuthorized? It has to do with ability to create
packages. How does one get said permissions? I gave the specified user,
central, sysadmin rights, but that didn't do the trick.

I'm running with the latest ckanext-harvest code and CKAN's
origin/release-v2.1 branch, using rabbit mq and solr running in jetty.

Thanks very much in advance!
-Dave


-----------------------
Command:
(pyenv) paster --plugin=ckanext-harvest harvester source
http://test.action.com test-for-action -c
~/Dropbox/code/python/development.ini

-----------------------
Output:
2013-08-13 13:13:40,202 DEBUG [ckanext.harvest.model] Harvest tables
defined in memory
2013-08-13 13:13:40,204 DEBUG [ckanext.harvest.model] Harvest tables
already exist

2013-08-13 13:13:40,253 INFO  [ckanext.harvest.logic.action.create]
Creating harvest source: {'user_id': u'', 'url': u'http://test.action.com',
'type': u'test-for-action', 'frequency': 'MANUAL', 'publisher_id': u'',
'active': True, 'config': None}
Traceback (most recent call last):
  File "/home/dwcaraway/pyenv/bin/paster", line 9, in <module>
    load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
  File
"/home/dwcaraway/pyenv/local/lib/python2.7/site-packages/paste/script/command.py",
line 104, in run
    invoke(command, command_name, options, args[1:])
  File
"/home/dwcaraway/pyenv/local/lib/python2.7/site-packages/paste/script/command.py",
line 143, in invoke
    exit_code = runner.run(args)
  File
"/home/dwcaraway/pyenv/local/lib/python2.7/site-packages/paste/script/command.py",
line 238, in run
    result = self.command()
  File
"/home/dwcaraway/Dropbox/code/python/ckan_harvest/ckanext/harvest/commands/harvester.py",
line 104, in command
    self.create_harvest_source()
  File
"/home/dwcaraway/Dropbox/code/python/ckan_harvest/ckanext/harvest/commands/harvester.py",
line 202, in create_harvest_source
    source = get_action('harvest_source_create')(context,data_dict)
  File
"/home/dwcaraway/pyenv/local/lib/python2.7/site-packages/ckan-2.1-py2.7.egg/ckan/logic/__init__.py",
line 329, in wrapped
    return _action(context, data_dict, **kw)
  File
"/home/dwcaraway/Dropbox/code/python/ckan_harvest/ckanext/harvest/logic/action/create.py",
line 59, in harvest_source_create
    package_dict = logic.get_action('package_create')(context, data_dict)
  File
"/home/dwcaraway/pyenv/local/lib/python2.7/site-packages/ckan-2.1-py2.7.egg/ckan/logic/__init__.py",
line 329, in wrapped
    return _action(context, data_dict, **kw)
  File
"/home/dwcaraway/pyenv/local/lib/python2.7/site-packages/ckan-2.1-py2.7.egg/ckan/logic/action/create.py",
line 124, in package_create
    _check_access('package_create', context, data_dict)
  File
"/home/dwcaraway/pyenv/local/lib/python2.7/site-packages/ckan-2.1-py2.7.egg/ckan/logic/__init__.py",
line 210, in check_access
    raise NotAuthorized(msg)
ckan.logic.NotAuthorized: User central not authorized to create packages
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130813/53936993/attachment.html>


More information about the ckan-dev mailing list