Skip to content

fix(docs): use relation 'reader' instead of 'can_view' in perform-check.mdx #1022

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
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 8 additions & 3 deletions docs/content/getting-started/perform-check.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ To obtain the [access token](https://auth0.com/docs/get-started/authentication-a

### 02. Calling Check API

To check whether user `user:anne` has relationship `can_view` with object `document:Z`
To check whether user `user:anne` has relationship `reader` with object `document:Z`

<CheckRequestViewer
user={'user:anne'}
relation={'can_view'}
relation={'reader'}
object={'document:Z'}
allowed={true}
skipSetup={true}
Expand All @@ -163,7 +163,12 @@ To check whether user `user:anne` has relationship `can_view` with object `docum
]}
/>

The result's `allowed` field will return `true` if the relationship exists and `false` if the relationship does not exist.
The result's `allowed` field will be:
- `true` if the relationship exists.
- `false` if the relation is defined in your model but no matching tuple exists.

If the relation is *not defined* in your model, the API will return a `400 Bad Request` instead of `false`.


### 03. Calling Batch Check API

Expand Down
Loading