conwetlab / ckanext-oauth2

OAuth2 support for CKAN
GNU Affero General Public License v3.0
25 stars 56 forks source link

Admin role in Fiware IDM? #11

Closed emepetres closed 7 years ago

emepetres commented 7 years ago

What is the role(s) that have to be configured in Fiware IDM to login as admin in CKAN? Is there other useful roles that CKAN understand?

Thanks.

aitormagan commented 7 years ago

Hi @emepetres,

First of all, thank you for your interest in the extension.

In response to your question, I am afraid to inform you that IdM roles are not transmitted to CKAN via this extension. Users created with this extension are normal users (not admins).

If you want an IdM user to become admin, first you need to login in your CKAN instance with that user. Then, execute the following command:

paster sysadmin add <USER> -c /etc/ckan/default/production.ini

(Extracted from: http://docs.ckan.org/en/latest/maintaining/getting-started.html#create-admin-user)

Replacing <USER> by the user you want to be admin.

Please, let me know if you have any other question.

BR Aitor

emepetres commented 7 years ago

Hi @aitormagan ,

Do you mean that the user must exist in ckan instance first? I logged in my ckan instance as root (docker container) and tried the command you proposed, but is says Command 'sysadmin' not known: ckan-paster sysadmin add jcarnero -c /etc/ckan/default/ckan.ini Command 'sysadmin' not known (you may need to run setup.py egg_info) Known commands: create Create the file layout for a Python distribution exe Run #! executable files help Display help make-config Install a package and create a fresh config file/directory points Show information about entry points post Run a request for the described application request Run a request for the described application serve Serve the described application setup-app Setup an application, given a config file

In my case as you see paster is called ckan-paster and config file is ckan.ini

emepetres commented 7 years ago

Ok @aitormagan , I managed to add the user activating the virtual environment first.

My user has now admin role, thank you very much!