How to make database policies so to respect N-N relationships #2551
Unanswered
karim-jouini42
asked this question in
Q&A
Replies: 0 comments
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.
-
Hello,
Need help dear comunity
I protect the tables with Policy/Database in dab-config, like this, on both UserProjects table and Users table
"permissions": [
{
"role": "Admin",
"actions": [
{
"action": "read",
"policy": {
"database": "@item.user_id eq @claims.userId"
}
}
]
}
]
I can't find a way to configure dab-config.json so that the following query, only returns projects my user can see. It keeps on behaving as if it is a LEFT JOIN not an INNER JOIN
query
{
projects
{
items
{
id,
name,
Users
{
items
{
id,
name
}
}
}
}
}
Any documentation I can read?
PS: I don't want to use RLS in SQL (it has many drawbacks, including perf)
Beta Was this translation helpful? Give feedback.
All reactions