[Guidance] Resource access authorization #7713
IndikaUdagedara
started this conversation in
General
Replies: 2 comments
-
This was discussed in the Tech Team meeting today...consensus was this looks more like a feature request and potentially a fair bit of work. Also, this would sit better in 'Discussions' rather than 'Issues' so will move it there |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello, we also want to add this feature at the moment. Have you implemented it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
CKAN version: 2.10
We have a requirement to enforce users to log-in to preview and download resources whilst keeping the datasets public i.e. Datasets must be publicly searchable and browsable but when a user goes to preview/download resources (of public or private Datasets), they should be redirected to the login page.
This should apply to API as well. E.g.
resource_show
should return 401 if user doesn't send a valid API key.Are you able to guide us to implement this using CKAN's plugins toolkit? We looked at
IAuthFunctions
but it seems to operate ataction
layer rather thanviews
i.e. we can add a custom auth function toresource_show
but resource view seems to be using other actions under the hood (e.g.package_show
), which we don't want to put behind authorization.Beta Was this translation helpful? Give feedback.
All reactions