hasura / hasura/graphql-engine
Allow permissions on specific fields in hasura actions
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
We execute an action and we want to be able to filter the result via permissions. Currently we are only able to set a general "Allowed" or "Not Allowed" check on the complete action, but it would be pretty good if we could have the same fine grained permissions as we have on a DB table.
The problem with this is that we now move this action into our backend to do the filtering ourselves, but this is something which should be possible in hasura.
### Describe the solution you'd like
Example would be:
1. Execute an action
2. Set permission on this action so that a user is only able to see data entries when a column has value X (which we get from the hasura session).
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by locating Hasura action permission handling and compare it with existing database-table permissions, then determine how session-derived conditions could apply to selected fields. Done means actions support field-level filtering based on permission rules rather than only an action-wide allow or deny.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api, authorization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100