Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication functions for views #7137

Open
Zharktas opened this issue Oct 13, 2022 · 2 comments
Open

Authentication functions for views #7137

Zharktas opened this issue Oct 13, 2022 · 2 comments

Comments

@Zharktas
Copy link
Member

This is related to #7131, current functionality is that views do various authentication checks to determine if user can see the view or not. These checks might be different than what the actual action is checking for some feature.

For example resource_delete action is calling package_show and package_update which both should be checked before the view is rendered additionally to resource_delete auth function.

Should we have separate auth functions for views themselves so that developers can control their auth functions without knowing the actual internals of CKAN ?

@bzar
Copy link
Contributor

bzar commented Oct 13, 2022

Such "view auth functions" should be implemented solely by calling the current "logic auth functions". Then they would not require additional overrides from site developers, since changes in the "logic auth functions" would propagate to them.

@amercader
Copy link
Member

We discussed this and felt than rather than adding a new layer of auth functions at the views level we should aim for all endpoints to only call the logic auth functions needed, and if an endpoint is calling an auth function that is a bit too out of scope, like in #7137 is better to fix that particular case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants