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

Compatibility with JSONAPI::Authorization (Resource Caching) #1177

Open
3 tasks done
harisadam opened this issue Sep 12, 2018 · 1 comment
Open
3 tasks done

Compatibility with JSONAPI::Authorization (Resource Caching) #1177

harisadam opened this issue Sep 12, 2018 · 1 comment

Comments

@harisadam
Copy link
Contributor

harisadam commented Sep 12, 2018

This issue is a (choose one):

  • Feature request.

Checklist before submitting:

  • I've searched for an existing issue.
  • The feature I'm asking for is compliant with the JSON:API spec.

Description

JSONAPI::Authorization is a pundit based authorization tool that works out-of-the-box with jsonapi-resources' ActiveRecord backed resources.
The problem is with Cached Resource as it does not have a model key.

JSONAPI::Authorization's related issue venuu/jsonapi-authorization#67

Features:

Exposing the original model into cache in CachedResourceFramgment(https://github.com/cerebris/jsonapi-resources/blob/master/lib/jsonapi/cached_response_fragment.rb#L87) would solve the problem easily – not sure about the cons.

I have a working solution in my fork so I can submit a PR If you are OK with the idea.

@adambedford
Copy link

I'd also love to get resource caching working with authorization. Any updates here?

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