You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead.
Checklist before submitting:
I've searched for an existing issue.
I've asked my question on Gitter and have not received a satisfactory answer.
I've included a complete bug report template. This step helps us and allows us to see the bug without trying to reproduce the problem from your description. It helps you because you will frequently detect if it's a problem specific to your project.
The feature I'm asking for is compliant with the JSON:API spec.
Description
Choose one section below and delete the other:
Bug reports:
Background info:
We are currently using the version 0.9.10 of JR in combination with jsonapi-authorization.
There is an open issue in jsonapi-authorization that clearly stops us from updating to the latest version.
Context setup:
We have an AR class entity that has_manytier_costs.
Some of these tier costs are scoped to a user context. E.g User 1 and User 2 both see the Entity 1. But User 1 can see Tier Cost 1 and 2 while User 2 can see only Tier Cost 1.
When the User 1 tries to do the following request: {{baseUrl}}/entities?include=tier_reward_costs all goes well and the included resources are all fine.
When the User 2 tries to do the same request the JR throws an error because it tries to fetch a resource that the User 2 does not have access to.
This issue is a (choose one):
Checklist before submitting:
Description
Choose one section below and delete the other:
Bug reports:
Background info:
Context setup:
entity
thathas_many
tier_costs
.{{baseUrl}}/entities?include=tier_reward_costs
all goes well and the included resources are all fine.I've pinpointed the source of the problem to:
jsonapi-resources/lib/jsonapi/resource.rb
Line 1354 in 5dd4362
My suggestion (and I'm submitting a PR in a minute) is that we should add results to the assoc_rels only if its not nil.
Here is the full log:
The text was updated successfully, but these errors were encountered: