SQL functions in row select permission
See original GitHub issueIs it possible to define SQL functions in row select permissions? Something like this does not seem to work currently:
{"_and":[{"date":{"_gte":"current_date - 1"}},{"date":{"_lte":"current_date + 1"}}]}
Date is a column of type Date
.
I would like to restrict the SELECT permission, to only allow rows having date between yesterday and tomorrow. Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:63
- Comments:16 (3 by maintainers)
Top Results From Across the Web
GRANT Object Permissions (Transact-SQL) - Microsoft Learn
Specifies the name of a column in a table, view, or table-valued function on which the permission is being granted. The parentheses (...
Read more >How to Implement Row and Column Level Security in SQL ...
SELECT — Principals requires this permission to get or read data from the table. INSERT — Principals need this permission to add new...
Read more >Introduction to Row-Level Security in SQL Server
A master user may be able to view all the records in the table. However, when a specific user logs in, the Row-Level...
Read more >No users or roles have SELECT permission on the SQL ...
No users or roles have SELECT permission on the SQL Server table but a user is able to select rows from it ·...
Read more >CREATE PERMISSION - Db2 SQL - IBM
If the reference of the table is for a fetch operation such as SELECT, the application of the row permission determines what set...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1 for this feature. Use case for me is limiting the number of possible rows inserted for a user based on a value in another table (e.g. limited number of records for given subscription tier).
I’d be interested in having this functionality for implementing a Zanzibar-style authorization model. Hasura’s permission syntax is currently limited by its inability (as far as I can tell) to traverse relations recursively.
References: