hasura / hasura/graphql-engine
Permissions using a computed column with hasura_session in the 2nd param
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
I would like to use a computed function that uses hasura_session in a permission check , but I get the error
the check would look like `{"canUpdateDevice":{"_eq":true}}`
`Computed columns with input arguments can not be part of the where clause`.
### Describe the solution you'd like
It would be nice to allow for hasura to support `{"canUpdateDevice":{"_eq":true}}` in the permission checks. And restrict any computed columns that do not have hasura_session as the 2nd argument.
### Describe alternatives you've considered
We could use the new input validation to stop update / deletes but this wouldnt work for selection restrictions.
Contributor guide
Assessment
This issue has not been assessed yet.