diff --git a/docs/graphql/core/auth/authorization/permission-rules.rst b/docs/graphql/core/auth/authorization/permission-rules.rst index 2c8403e5ac8..434bb865e70 100644 --- a/docs/graphql/core/auth/authorization/permission-rules.rst +++ b/docs/graphql/core/auth/authorization/permission-rules.rst @@ -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 diff --git a/docs/graphql/core/auth/authorization/roles-variables.rst b/docs/graphql/core/auth/authorization/roles-variables.rst index 33c7d4bd737..5d571729f6a 100644 --- a/docs/graphql/core/auth/authorization/roles-variables.rst +++ b/docs/graphql/core/auth/authorization/roles-variables.rst @@ -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 ---------------------------