New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support JSON arrays in session variables #1799
Conversation
@nizar-m Can you share the permission rule you used to set this up as well? |
Review app for commit 9d61823 deployed to Heroku: https://hge-ci-pull-1799.herokuapp.com |
@dsandip This should potentially also have an associated section in auth docs that talk about how and when to use this feature. Especially important in enterprise type scenarios when ownership information is outside the database. Like:
And the list of allowed accounts for the manager comes from an external database. |
Deploy preview for hasura-docs ready! Built with commit 06abe03 |
…ing, but not a session variable
Review app for commit 00864a5 deployed to Heroku: https://hge-ci-pull-1799.herokuapp.com |
@nizar-m @dsandip Has this been reviewed by @rakeshkky or @ecthiender ? |
@coco98 No, not yet |
Added console code to handle session variable value for array operators. The UX seems slightly odd. Couldn't come up with something more intuitive. Please share feedback / suggestions if any. |
Review app for commit 20202f5 deployed to Heroku: https://hge-ci-pull-1799.herokuapp.com |
Review app for commit e362ee8 deployed to Heroku: https://hge-ci-pull-1799.herokuapp.com |
This is really nice! When will it be ready? |
Great, this will solve many current workarounds 👍 |
added in #2475 |
Review app https://hge-ci-pull-1799.herokuapp.com is deleted |
Sorry, is somebody working on this? |
Description
Setting the permission
The following query will fail (because id:
28
is NOT inX-Hasura-Allowed-Ids: [21,23,25,27]
)with the following response
while the following query gets through (as id:
23
is inX-Hasura-Allowed-Ids: [21,23,25,27]
)Affected components
Related Issues
#1452
#1333
Solution and Design
column_value IN (SELECT json_array_elements_text(sessionVar))
_in
and_nin
boolean expressionsSteps to test and verify
Limitations, known bugs & workarounds