Permissions: _count operator in permissions? #9233
Unanswered
petegriffith
asked this question in
Question
Replies: 1 comment
-
@petegriffith |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When setting custom permissions, is there a way to use something like _count to check the number of entries on a table?
For instance, a given user role has permission to delete an entry from the
special_user
table if they are in the special_user table AND there is at least one otherspecial_user
in the table. The first half is simple:{"special_users":{"account":{"auth_uid":{"_eq":"X-Hasura-User-Id"}}}}
But what would the second half of the _and look like? Something like this?
{"special_users":{_COUNT:{"_gt": 0}}
Beta Was this translation helpful? Give feedback.
All reactions