CKAN with data access only after login

后端 未结 2 645
余生分开走
余生分开走 2021-01-17 01:58

Can CKAN be used for a website where users only get access to the datasets after login?

I have in mind a site like www.statista.com run with CKAN that gives users ac

相关标签:
2条回答
  • 2021-01-17 02:27

    You can write custom extensions for CKAN, where you can define your custom authentication. A good point where to start is: https://ckan.readthedocs.org/en/latest/maintaining/authorization.html

    0 讨论(0)
  • 2021-01-17 02:39

    CKAN has its own authentication system, but we have developed a extension that allows developers to use some IdM (including the FIWARE one) to authenticate the users. If you want to use this extension you can check the instructions for installing it on https://github.com/conwetlab/ckanext-oauth2

    We have also developed another extension to manage the users that can view a specific dataset. However, I think this extension does not fit to your purposes, but you can develop your own extension (as stated by Kapucko). It's very easy, you have to follow the instructions provided on http://docs.ckan.org/en/latest/extensions/tutorial.html.

    In your case you will have to implement the IAuthFunctions plugin interface, overwrite the package_show function and return { 'success': True } only when the user is logged in. I seem to remember that this only happens when context.get('auth_user_obj') is not None.

    You can also use organizations and create all the datasets within it (setting the Visibility field to Private). Nevertheless, I do not recommend you this approach since you will have to manually insert new users.

    0 讨论(0)
提交回复
热议问题