mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
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:
parent
d798e18fa2
commit
decd3dcc55
@ -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
|
||||
|
@ -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 |
Loading…
Reference in New Issue
Block a user