DashboardFilter and SliceFilter classes ignore database_access and schema_access #4737
Closed
3 tasks done
Labels
inactive
Inactive for >= 30 days
Make sure these boxes are checked before submitting your issue - thank you!
Superset version
0.23.0dev
Expected results
Per the embedded
TODO
comments DashboardFilter and SliceFilter filters should support roles which specify eitherdatabase_access
orschema_access
.Actual results
The SliceFilter and DashboardFilter classes ensure that the user only sees dashboards and slices which they're sanctioned to see per the security manager for the
/slicemodelview/list
and/dashboardmodelview/list
endpoints respectively. Additionally the DashboardFilter class is used to filter which dashboards one may save a slice to.Currently this logic works if one either has a role with
all_datasource_access
or where the role enumerates specific datasources, however roles which specify either adatabase_access
orschema_access
permission don't include the corresponding datasources and thus the filter evaluates toFalse
when validating the slice permissions.Note I'm uncertain how best to resolve this issue. Simply enumerating all the datasources for a given schema or database is extremely inefficient for validating whether a user is able to see a slice based on its permissions. @timifasubaa and @fabianmenges this may complicate the delegated access work.
Steps to reproduce
database_access
orschema_access
Created Content
tab on the user's profile page.The text was updated successfully, but these errors were encountered: