Skip to content

Commit

Permalink
updated docs auth rules page
Browse files Browse the repository at this point in the history
Signed-off-by: Fortune Ikechi <ikechifortune@gmail.com>
  • Loading branch information
iamfortune committed May 14, 2024
1 parent 38a0591 commit 513fadb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/db/authorization/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Every authorization rule must include the following:

Each rule can specify permissions for CRUD operations (`find`, `save`, `delete`). Here's an example illustrating how these permissions are structured:

```json
```json title="Example JSON object"
{
"role": "user",
"entity": "page",
Expand All @@ -40,7 +40,7 @@ This configuration allows users with the `user` role to `find` and `delete` page

For more fine-grained control, use the `checks` field to define conditions under which operations can be executed. Every entity operation — such as `find`, `insert`, `save` or `delete` — can have authorization `checks` specified for them. This value can be `false` (operation disabled) or `true` (operation enabled with no checks).

```json
```json title="Example JSON object"
{
"role": "user",
"entity": "page",
Expand Down Expand Up @@ -76,7 +76,7 @@ Platformatic DB allows the specification of `fields` arrays in authorization rul

For `save` operations, it's important to include all not-nullable fields in the configuration to prevent runtime errors due to missing data. Platformatic performs these checks at startup to ensure configurations are correct.

```json title='Example JSON object'
```json title="Example JSON object"
{
"rule": {
"entity": "page",
Expand Down

0 comments on commit 513fadb

Please sign in to comment.