GitHub user RyanAccuWebCloud added a comment to the discussion: Best Way to 
Attach Dashboard RBAC Roles Automatically in Superset

yep, your understanding is spot on. When you’ve got RLS already managing 
dataset-level access, tagging dashboards with a specific role is exactly how to 
make them visible to that role without broadening permissions elsewhere.

You’re right that the admin usually has to do this manually in the dashboard’s 
properties, which is why automating it makes sense. The API route with 
FAB_ADD_SECURITY_API = True will work well for that — you can hit the 
/api/v1/dashboard/<id> endpoint and attach your custom role automatically.

If you’re scripting it, just remember:

You’ll need both the access token and CSRF token.
Use a simple loop to update dashboards as they’re created (either scheduled or 
triggered on deployment).
Avoid DB-level inserts; the ORM/API method will survive version upgrades much 
better.

GitHub link: 
https://github.com/apache/superset/discussions/35570#discussioncomment-14676131

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to