You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/07 05:53:28 UTC
[GitHub] [incubator-superset] villebro commented on a change in pull request #10805: Fix: Include RLS filters for cache keys
villebro commented on a change in pull request #10805:
URL: https://github.com/apache/incubator-superset/pull/10805#discussion_r484196075
##########
File path: superset/connectors/sqla/models.py
##########
@@ -1454,6 +1454,11 @@ def has_extra_cache_key_calls(self, query_obj: QueryObjectDict) -> bool:
templatable_statements.append(extras["where"])
if "having" in extras:
templatable_statements.append(extras["having"])
+ # make sure the RLS filters are included
+ if config["ENABLE_ROW_LEVEL_SECURITY"] and self.is_rls_supported:
+ templatable_statements += [
+ f.clause
+ for f in security_manager.get_rls_filters(self) ]
Review comment:
Please make sure to run black on your code prior to opening a PR (check `pre-commit` hooks in [CONTIBUTING.md](https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md#git-hooks))
```suggestion
if config["ENABLE_ROW_LEVEL_SECURITY"] and self.is_rls_supported:
templatable_statements += [
f.clause for f in security_manager.get_rls_filters(self)
]
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org