[ckan-dev] Change dataset owner ('creator_user_id')

lucia.espona at wsl.ch lucia.espona at wsl.ch
Sun Aug 26 23:12:06 UTC 2018


Dear Nathan

Thanks a lot for your help but I do need to change the "creator_user_id" because of the custom authorization we have in our portal.
We allow editors to edit only their own datasets (so the ones where they are the creators), so for the (exceptional) case an editor leaves the organization, we need to find a way to transfer them to other user, which means changing "creator_user_id".

For what I see, it is only a single field change in the DB ("package"."creator_user_id") but maybe someone knows more about it. Alternatively I can maybe extend the action API and write a "package_creator_user_id_update" :)

Best,
Lucia
_________________________________________________________
Dr. Lucia Espona Pernas

Swiss Federal Institute for Forest, Snow and Landscape Research WSL
Hauptgebäaude Labortrakt (HL C21)
Zürcherstrasse 111
8903 Birmensdorf
Switzerland

+41 44 739 28 71 phone direct
+41 44 739 21 11 reception

www.wsl.ch

-----"Nathan Perry" <nathan at salsadigital.com.au> wrote: -----
To: lucia.espona at wsl.ch
From: "Nathan Perry" <nathan at salsadigital.com.au>
Date: 26.08.2018 23:18
Subject: re: [ckan-dev] Change dataset owner ('creator_user_id')

Hi Lucia,

Apologies for replying to this outside of the CKAN Dev list - I get the digest mode and wasn't sure how to respond to the exact email.

Anyway - I think you might be after the "owner_org" not the "creator_user_id" -- have you tried this particular API endpoint:

http://docs.ckan.org/en/ckan-2.7.3/api/#ckan.logic.action.update.package_owner_org_update

That might get you want you need.

All the best,
Nathan.  
 

t  1300 727 952
w  salsadigital.com.aua  First Floor, 159 Victoria Parade, Collingwood, VIC 3066 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20180827/b5d9153f/attachment-0002.html>


More information about the ckan-dev mailing list