chore(rls): move to feature flag and disable related view (#11575)

* chore(rls): move to feature flag and disable related view

* rename feature flag
This commit is contained in:
Ville Brofeldt
2020-11-05 12:19:48 +02:00
committed by GitHub
parent 52145f8683
commit 600a6fa92a
10 changed files with 22 additions and 18 deletions

View File

@@ -24,7 +24,7 @@ import numpy as np
import pandas as pd
from flask_babel import gettext as _
from superset import app, cache, db, security_manager
from superset import app, cache, db, is_feature_enabled, security_manager
from superset.common.query_object import QueryObject
from superset.connectors.base.models import BaseDatasource
from superset.connectors.connector_registry import ConnectorRegistry
@@ -207,7 +207,7 @@ class QueryContext:
datasource=self.datasource.uid,
extra_cache_keys=extra_cache_keys,
rls=security_manager.get_rls_ids(self.datasource)
if config["ENABLE_ROW_LEVEL_SECURITY"]
if is_feature_enabled("ROW_LEVEL_SECURITY")
and self.datasource.is_rls_supported
else [],
changed_on=self.datasource.changed_on,