Skip to content

Commit

Permalink
fix: SQLAlchemy coercing subquery warning on RLS (#21257)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar authored Aug 31, 2022
1 parent 034ee1c commit 6223042
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions superset/security/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,6 @@ def get_rls_filters(self, table: "BaseDatasource") -> List[SqlaQuery]:
RowLevelSecurityFilter.filter_type == RowLevelSecurityFilterType.REGULAR
)
.filter(RLSFilterRoles.c.role_id.in_(user_roles))
.subquery()
)
base_filter_roles = (
self.get_session()
Expand All @@ -1477,13 +1476,11 @@ def get_rls_filters(self, table: "BaseDatasource") -> List[SqlaQuery]:
RowLevelSecurityFilter.filter_type == RowLevelSecurityFilterType.BASE
)
.filter(RLSFilterRoles.c.role_id.in_(user_roles))
.subquery()
)
filter_tables = (
self.get_session()
.query(RLSFilterTables.c.rls_filter_id)
.filter(RLSFilterTables.c.table_id == table.id)
.subquery()
)
query = (
self.get_session()
Expand Down

0 comments on commit 6223042

Please sign in to comment.