Search code examples
ckan

In CKAN can you have public datasets but have all resources private until a user registers or logs in?


I have been tasked to find out more about the capabilities of CKAN. We would like to know how do you create an environment where users can see all public datasets but all the resources are private until the user registers and/or logs in.

Thanks


Solution

  • CKAN (without extensions installed) allows datasets as a whole to be private or public. There is no separate resource-level privacy.

    Adding this functionality by a CKAN extensions is very doable. For example, if you'll be uploading data files, you might adapt something like the secure URL functionality of this: https://github.com/open-data/ckanext-cloudstorage Or if you want to serve data via datastore then you could simply adapt the auth functions for datastore_search & datastore_search_sql. There's a tutorial on writing an extension to change auth rules here: https://docs.ckan.org/en/2.8/extensions/tutorial.html