You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2020/04/30 17:22:23 UTC

[incubator-superset] branch master updated: fix(security) Fixing regression in #9689 (#9705)

This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new a908813  fix(security) Fixing regression in #9689 (#9705)
a908813 is described below

commit a908813f8983a130a91a480484f1ff8f88e5b428
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Thu Apr 30 10:22:03 2020 -0700

    fix(security) Fixing regression in #9689 (#9705)
    
    Co-authored-by: John Bodley <jo...@airbnb.com>
---
 superset/viz.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/superset/viz.py b/superset/viz.py
index 85d1d9d..c167329 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -399,8 +399,11 @@ class BaseViz:
         cache_dict["time_range"] = self.form_data.get("time_range")
         cache_dict["datasource"] = self.datasource.uid
         cache_dict["extra_cache_keys"] = self.datasource.get_extra_cache_keys(query_obj)
-        if config["ENABLE_ROW_LEVEL_SECURITY"]:
-            cache_dict["rls"] = security_manager.get_rls_ids(self.datasource)
+        cache_dict["rls"] = (
+            security_manager.get_rls_ids(self.datasource)
+            if config["ENABLE_ROW_LEVEL_SECURITY"]
+            else []
+        )
         cache_dict["changed_on"] = self.datasource.changed_on
         json_data = self.json_dumps(cache_dict, sort_keys=True)
         return hashlib.md5(json_data.encode("utf-8")).hexdigest()