Docs: Small Changes 4

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8694
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: 134a08f70614c5fbc0fa889912c58134dd2548bc
This commit is contained in:
Sean Park-Ross 2023-04-19 18:57:47 +02:00 committed by hasura-bot
parent d798e18fa2
commit decd3dcc55
3 changed files with 11 additions and 3 deletions

View File

@ -136,6 +136,9 @@ this request. Unlike JWT auth mode, you do not have to pass `X-Hasura-Allowed-Ro
variables. This is because the webhook is called for each request, allowing the auth service to easily switch the user
role if needed.
In the example below the `X-Hasura-Is-Owner` and `X-Hasura-Custom` are examples of custom session variables which
will be available to your permission rules in Hasura Engine.
```http
HTTP/1.1 200 OK
Content-Type: application/json

View File

@ -298,13 +298,18 @@ from `from session variable` mapping to `X-HASURA-USER-ID`.
<Thumbnail src="/img/resources/hasura-as-gql-backend/insert-permission.png" alt="Cloud Dashboard" width="800px" />
:::info Session variables are key-value pairs returned from the authentication service for each request. When a user
makes a request, the session token maps to a `USER-ID`. This `USER-ID` can be used in permission to show that inserts
into a table are only allowed if the `user_id` column has a value equal to that of `USER-ID`, the session variable. :::
:::info Session variables are key-value pairs returned from the authentication service for each request
When a user makes a request, the session token maps to a `USER-ID`. This `USER-ID` can be used in permission to show
that inserts into a table are only allowed if the `user_id` column has a value equal to that of `USER-ID`, the session
variable.
Click on `Save Permissions`.
Similarly you can setup `Select`, `Update` and `Delete`permissions and permissions for the `todos table`.
:::
## Advanced topics
Up until now, we have addressed the data-modeling and relationships part of constructing a backend. However, Hasura

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB