Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/guides/check-permission.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ You can still use the `check` API even if your access policies use these unsuppo

## Notes About Anonymous Context

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:
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:

- `auth() == null` evaluates to `true`.
- `auth() != null` evaluates to `false`.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/prisma-client-ext.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The API is not supported on edge runtime (e.g., Cloudflare Workers or Vercel Edg

#### Description

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.
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.

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

Expand Down