villebro commented on a change in pull request #13859:
URL: https://github.com/apache/superset/pull/13859#discussion_r604340979



##########
File path: superset/viz.py
##########
@@ -2050,6 +2059,10 @@ def run_extra_queries(self) -> None:
             qry["groupby"] = [col]
             metric = flt.get("metric")
             qry["metrics"] = [metric] if metric else []
+            QueryContext(
+                datasource={"id": self.datasource.id, "type": 
self.datasource.type},
+                queries=[qry],
+            ).raise_for_access()

Review comment:
       Just so I don't misunderstand something, isn't 
`QueryContext.raise_for_access()` mostly just calling 
`SupersetSecurityManager.raise_for_access()`? I tried to look at what other 
assertions it does, but it's mostly just validating that there are no duplicate 
columns/metric if I'm not mistaken (to echo what @amitmiran137 said).




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to