Repository navigation
rls rule #41558
Replies: 2 comments 2 replies
|
Your configuration is correct — specifying a table in the When Superset executes a query for each chart, it checks which RLS rules have that chart's datasource listed in their So your rule: {
"clause": "RPM_FOR_NAME='COMPANY_NAME'",
"tables": ["TABLE_NAME"]
}will only add the A few things to note:
If the rule doesn't seem to be working as expected, double-check that the table you selected in the RLS configuration matches the exact datasource used by the chart you want filtered. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
In Superset, the guest token Row Level Security payload does not use a You can inspect the exact matching logic in # From superset/security/manager.py
if guest_user := self.get_current_guest_user_if_guest():
return [
rule
for rule in guest_user.rls
if not rule.get("dataset")
or str(rule.get("dataset")) == str(dataset.data["id"])
]How to Target a Specific Dataset in the Guest TokenTo apply an RLS rule exclusively to one datasource in an embedded dashboard with multiple charts, provide the numeric {
"user": {
"username": "guest_user",
"first_name": "Guest",
"last_name": "User"
},
"resources": [
{
"type": "dashboard",
"id": "YOUR_DASHBOARD_UUID"
}
],
"rls": [
{
"clause": "RPM_FOR_NAME = 'COMPANY_NAME'",
"dataset": 42
}
]
}Key Rules:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
so i am embedding a dashboard which has multiple charts from different datasource , i am applying rls rule in dashboard level , but i want only the datasource i specify to apply the rls rule
{
"clause": "RPM_FOR_NAME='COMPANY_NAME'",
"tables": [
"TABLE_NAME"
]
}
this is for superset 5
@dosu
All reactions