Skip to content

Commit

Permalink
fix: SQLAlchemy coercing subquery warning on RLS
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar committed Aug 30, 2022
1 parent b354f22 commit 0fe9eb7
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 0fe9eb7

Please sign in to comment.