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:13 UTC
[superset] 01/03: logging
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 77cb195f7847ce96bc82b05dfcf3b233b2df8d96
Author: David Aaron Suddjian <aa...@gmail.com>
AuthorDate: Fri Feb 25 12:35:24 2022 -0800
logging
---
superset/security/manager.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/superset/security/manager.py b/superset/security/manager.py
index 0bed447..2d57fde 100644
--- a/superset/security/manager.py
+++ b/superset/security/manager.py
@@ -1132,13 +1132,17 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
:return: A list of filters
"""
guest_user = self.get_current_guest_user_if_guest()
+ logging.warning(f"!debugging! get_guest_rls_filters guest user: {guest_user}")
+ logging.warning(f"!debugging! get_guest_rls_filters g.user: {g.user}")
if guest_user:
- return [
+ rules = [
rule
for rule in guest_user.rls
if not rule.get("dataset")
or str(rule.get("dataset")) == str(dataset.id)
]
+ logging.warning(f"!debugging! get_guest_rls_filters rules: {rules}")
+ return rules
return []
def get_rls_filters(self, table: "BaseDatasource") -> List[SqlaQuery]: