Skip to content

having filter guards call controller method causes issues when resource is sideloaded #90

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

Open
Dishwasha opened this issue May 24, 2018 · 1 comment

Comments

@Dishwasha
Copy link
Contributor

Unless the controller method used for a filter guard exists on all controllers a resource could be sideloaded from, using a guard on an allow_filter will break when the filtered resource is fetched through sideloading. Since changing jsonapi_compliable to call guard on resource rather than controller will created a backwards incompatible change, I'm reporting the issue rather than attempting to fix it.

@thec0keman
Copy link

Just want to piggy back here that guards on the resource make a lot more sense.

The docs do indicate 'runtime context', but the example is a bit misleading.

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

No branches or pull requests

2 participants