Skip to content

Add warning to docs on permission check with related urls #872

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

Merged
merged 3 commits into from
Dec 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,14 @@ class OrderSerializer(serializers.HyperlinkedModelSerializer):
}
```

<div class="warning">
<strong>Note:</strong>
Even though with related urls relations are served on different urls there are still served
by the same view. This means that the object permission check is performed on the parent object.
In other words when the parent object is accessible by the user the related object will be as well.
</div>


### RelationshipView
`rest_framework_json_api.views.RelationshipView` is used to build
relationship views (see the
Expand Down