Skip to content

Commit dfd3f68

Browse files
authored
doc: updates about the check API (#378)
* doc: updates about the `check` API * update
1 parent 4ce5191 commit dfd3f68

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/guides/check-permission.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ You can still use the `check` API even if your access policies use these unsuppo
194194

195195
## Notes About Anonymous Context
196196

197-
Access policy rules often use `auth()` and members of `auth()` (e.g., `auth().role`) in them. When a PrismaClient is enhanced in an anonymous context (calling `enhance` without context user object), neither `auth()` nor its members are unavailable. In such cases, the following evaluation rules apply:
197+
Access policy rules often use `auth()` and members of `auth()` (e.g., `auth().role`) in them. When a PrismaClient is enhanced in an anonymous context (calling `enhance` without context user object), neither `auth()` nor its members are available. In such cases, the following evaluation rules apply:
198198

199199
- `auth() == null` evaluates to `true`.
200200
- `auth() != null` evaluates to `false`.

docs/reference/prisma-client-ext.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The API is not supported on edge runtime (e.g., Cloudflare Workers or Vercel Edg
2020

2121
#### Description
2222

23-
Checks if the current user is allowed to perform the specified operation on the model based on the access policies in ZModel. The check is done via pure logical inference and doesn't query the database.
23+
Checks if the current user is allowed to perform the specified operation on the model based on the access policies in ZModel. The check is done via pure logical inference and doesn't query the database. It currently only deals with model-level policies and field-level ones are ignored.
2424

2525
Please refer to [Checking Permissions Without Hitting the Database](../guides/check-permission) for more details.
2626

0 commit comments

Comments
 (0)