[ckan-dev] ckan.logic.NotAuthorized: User admin not authorized to create packages
Richard Gomes
rgomes.info at gmail.com
Thu Sep 19 15:22:45 UTC 2013
hello,
Anyone has any clue why a sysadmin would not be allowed to create packages?
*Code:*
print('--- action ---', action)
print('--- context ---', pretty(context))
print('--- kwargs ---', pretty(kwargs))
return self._get_action(action)(dict(context), dict(kwargs))
*Debug info + Stacktrace:*
('--- action ---', 'package_create')
('--- context ---', '{\n "user": "admin"\n}')
('--- kwargs ---', '{\n "license_id": "other-closed",\n "name":
"shares",\n "owner_org": "_pmaluf",\n "title": "Share prices"\n}')
Traceback (most recent call last):
File "/home/rgomes/.virtualenvs/default/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File
"/home/rgomes/.virtualenvs/default/lib/python2.7/site-packages/paste/script/command.py",
line 104, in run
invoke(command, command_name, options, args[1:])
File
"/home/rgomes/.virtualenvs/default/lib/python2.7/site-packages/paste/script/command.py",
line 143, in invoke
exit_code = runner.run(args)
File
"/home/rgomes/.virtualenvs/default/lib/python2.7/site-packages/paste/script/command.py",
line 238, in run
result = self.command()
File
"/mnt/nfs/terra.localdomain/home/rgomes/workspace/xkbmedia/webapps/datalayer/datalayer/test.py",
line 123, in command
self.process()
File
"/mnt/nfs/terra.localdomain/home/rgomes/workspace/xkbmedia/webapps/datalayer/datalayer/test.py",
line 138, in process
self.package_create('shares', 'Share prices', '_pmaluf')
File
"/mnt/nfs/terra.localdomain/home/rgomes/workspace/xkbmedia/webapps/datalayer/datalayer/test.py",
line 190, in package_create
self.__cli.package_create(name=pkg, title=title,
license_id='other-closed', owner_org=owner_org)
File
"/mnt/nfs/terra.localdomain/home/rgomes/workspace/xkbmedia/webapps/datalayer/datalayer/action/api.py",
line 324, in package_create
def package_create(self, **kwargs): return
self.delegate.action('package_create', **kwargs)
File
"/mnt/nfs/terra.localdomain/home/rgomes/workspace/xkbmedia/webapps/datalayer/datalayer/action/api.py",
line 106, in action
return self._get_action(action)(dict(context), dict(kwargs))
File
"/home/rgomes/.virtualenvs/default/lib/python2.7/site-packages/ckan-2.1.1b-py2.7.egg/ckan/logic/__init__.py",
line 329, in wrapped
return _action(context, data_dict, **kw)
File
"/home/rgomes/.virtualenvs/default/lib/python2.7/site-packages/ckan-2.1.1b-py2.7.egg/ckan/logic/action/create.py",
line 124, in package_create
_check_access('package_create', context, data_dict)
File
"/home/rgomes/.virtualenvs/default/lib/python2.7/site-packages/ckan-2.1.1b-py2.7.egg/ckan/logic/__init__.py",
line 210, in check_access
raise NotAuthorized(msg)
*ckan.logic.NotAuthorized: User admin not authorized to create packages*
*This is what user 'admin':*
{
"about": null,
"activity": [
{
"approved_timestamp": null,
"author": "admin",
"groups": [],
"id": "36584d29-31ce-4041-9ba9-46ab2fbf3f2c",
"message": "REST API: Update object _pmaluf",
"packages": [],
"state": "active",
"timestamp": "2013-09-19T15:00:28.453092"
},
{
"approved_timestamp": null,
"author": "admin",
"groups": [
"_pmaluf"
],
"id": "5072148c-59c9-489d-bb4c-d807a4d33100",
"message": "REST API: Update object _pmaluf",
"packages": [],
"state": "active",
"timestamp": "2013-09-19T14:53:37.742066"
},
{
"approved_timestamp": null,
"author": "admin",
"groups": [
"_pmaluf"
],
"id": "f405f0dc-6beb-478b-817b-3bfd916a26ab",
"message": "REST API: Create member object ",
"packages": [],
"state": "active",
"timestamp": "2013-09-19T14:53:37.540622"
},
{
"approved_timestamp": null,
"author": "admin",
"groups": [
"_pmaluf"
],
"id": "c3f4a1e6-7760-4d58-aa41-656297524388",
"message": "REST API: Create object _pmaluf",
"packages": [],
"state": "active",
"timestamp": "2013-09-19T14:53:37.295787"
},
{
"approved_timestamp": "2013-09-19T14:42:33.355469",
"author": "admin",
"groups": [],
"id": "43098933-808b-4698-a42d-4b091a296064",
"message": "Admin: make sure every object has a row in a
revision table",
"packages": [],
"state": "active",
"timestamp": "2013-09-19T14:42:33.355469"
}
],
"activity_streams_email_notifications": false,
"apikey": "7e733b6d-d9c1-4ff9-9771-ae630f652331",
"created": "2013-09-19T15:53:27.711730",
"datasets": [],
"display_name": "admin",
"email": null,
"email_hash": "d41d8cd98f00b204e9800998ecf8427e",
"fullname": null,
"id": "859796c3-ee61-4766-9265-29486be40ef6",
"name": "admin",
"num_followers": 0,
"number_administered_packages": 0,
"number_of_edits": 5,
"openid": null,
"reset_key": null,
"sysadmin": true
}
Thanks
Richard Gomes
http://rgomes.info
http://www.linkedin.com/in/rgomes
mobile: +44(77)9955-6813
inum <http://www.inum.net/>: +883(5100)0800-9804
On 19/09/13 09:41, Isabel Ruiz wrote:
> Hi!
>
> I am running a CKAN 2.0, but I would like make some changes on it (for
> example, show on my homepage: latests dataset created, a counter of
> each tags ,...)
>
> Is there a site where I can look for methods available?
>
> I mean: I need to know which methods I can use for datasources,
> dataset, groups...
>
> Thanks a lot!!!
> --
> Isabel M. Ruiz Mellado
> http://about.me/isabelruiz
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130919/385605bd/attachment-0001.html>
More information about the ckan-dev
mailing list