hasura / hasura/graphql-engine

Permissions using a computed column with hasura_session in the 2nd param

Open
#9,883 0 comments 0 reactions 0 assignees View on GitHub
k/enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.