You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by li...@apache.org on 2022/02/26 00:17:15 UTC
[superset] 03/03: comment out ROW_LEVEL_SECURITY
This is an automated email from the ASF dual-hosted git repository.
lilykuang pushed a commit to branch fix/guest-access-handling
in repository https://gitbox.apache.org/repos/asf/superset.git
commit ef8faaf2a2e28f1724032293fc9b78fbde8e7de7
Author: Lily Kuang <li...@preset.io>
AuthorDate: Fri Feb 25 16:06:06 2022 -0800
comment out ROW_LEVEL_SECURITY
---
superset/connectors/sqla/models.py | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index cc2ecc1..952ae90 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -994,12 +994,12 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho
logging.warning(
f"!debugging! _get_sqla_row_level_filters feature flag: {is_embedded}"
)
- if is_embedded:
- for rule in security_manager.get_guest_rls_filters(self):
- clause = self.text(
- f"({template_processor.process_template(rule['clause'])})"
- )
- all_filters.append(clause)
+ # if is_embedded:
+ for rule in security_manager.get_guest_rls_filters(self):
+ clause = self.text(
+ f"({template_processor.process_template(rule['clause'])})"
+ )
+ all_filters.append(clause)
grouped_filters = [or_(*clauses) for clauses in filter_groups.values()]
all_filters.extend(grouped_filters)
@@ -1358,8 +1358,12 @@ class SqlaTable(Model, BaseDatasource): # pylint: disable=too-many-public-metho
raise QueryObjectValidationError(
_("Invalid filter operation type: %(op)s", op=op)
)
- if is_feature_enabled("ROW_LEVEL_SECURITY"):
- where_clause_and += self._get_sqla_row_level_filters(template_processor)
+ # if is_feature_enabled("ROW_LEVEL_SECURITY"):
+ is_rls = is_feature_enabled("ROW_LEVEL_SECURITY")
+ logging.warning(
+ f"!debugging! _get_sqla_query feature flag (ROW_LEVEL_SECURITY): {is_rls}"
+ )
+ where_clause_and += self._get_sqla_row_level_filters(template_processor)
if extras:
where = extras.get("where")
if where: