mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
https://github.com/hasura/graphql-engine/pull/5595
This commit is contained in:
parent
2579f122e6
commit
09d0d58436
@ -151,6 +151,15 @@ the author's ID*):
|
||||
.. thumbnail:: /img/graphql/core/auth/session-variables-in-permissions-simple-example.png
|
||||
:alt: Using session variables to build rules
|
||||
|
||||
.. admonition:: Array session variables in permission rules
|
||||
|
||||
Support for using session variables for array operators like ``_in``, ``_nin``, ``_has_any_keys``,
|
||||
``_has_all_keys`` is available in versions ``v.1.0.0-beta.3`` and above.
|
||||
|
||||
When you use array operators such as ``_in`` in the permissions builder in the Hasura console, it will automatically open an array for your values.
|
||||
If your session variable value is already an array, you can click the ``[X-Hasura-Allowed-Ids]`` suggestion to remove the brackets and set your
|
||||
session variable in its place.
|
||||
|
||||
.. _relationships-in-permissions:
|
||||
|
||||
Using relationships or nested objects
|
||||
|
@ -221,10 +221,14 @@ The permission for ``org-member`` role changes to this:
|
||||
]
|
||||
}
|
||||
|
||||
.. admonition:: Arrays in permission rules
|
||||
.. admonition:: Array session variables in permission rules
|
||||
|
||||
Support for using session variables for array operators like ``_in``, ``_nin``, ``_has_any_keys``,
|
||||
``_has_all_keys`` is only added in ``beta.3`` release.
|
||||
``_has_all_keys`` is available in versions ``v.1.0.0-beta.3`` and above.
|
||||
|
||||
When you use array operators such as ``_in`` in the permissions builder in the Hasura console, it will automatically open an array for your values.
|
||||
If your session variable value is already an array, you can click the ``[X-Hasura-Allowed-Ids]`` suggestion to remove the brackets and set your
|
||||
session variable in its place.
|
||||
|
||||
Format of session variables
|
||||
---------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user