Skip to content

Commit

Permalink
add example for separated configuration for read and write
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiobotaro committed Jul 19, 2018
1 parent 3fac70f commit 000cf87
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion content/permissions/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,28 @@ permissions = ["read", "write", "delete"]
fields = ["id", "name"]
```

Multiple configurations for the same table:

```
[access]
restrict = true # can access only the tables listed below
[[access.tables]]
name = "test"
permissions = ["read"]
fields = ["id", "name"]
[[access.tables]]
name = "test"
permissions = ["write"]
fields = ["name"]
```

|attribute|description|
|---|---|
|table|Table name|
|permissions|Table permissions. Options: `read`, `write` and `delete`|
|fields|Fields permitted for select|
|fields|Fields permitted for operations|


Configuration example: [prest.toml](https://github.com/prest/prest/blob/master/testdata/prest.toml)

0 comments on commit 000cf87

Please sign in to comment.