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/06/11 03:31:29 UTC

[GitHub] [incubator-superset] etr2460 commented on a change in pull request #10034: chore(security): Updating assert logic

etr2460 commented on a change in pull request #10034:
URL: https://github.com/apache/incubator-superset/pull/10034#discussion_r438522620



##########
File path: superset/security/manager.py
##########
@@ -269,9 +269,12 @@ def datasource_access(self, datasource: "BaseDatasource") -> bool:
         :returns: Whether the use can access the Superset datasource
         """
 
-        return self.schema_access(datasource) or self.can_access(
-            "datasource_access", datasource.perm
-        )
+        try:
+            self.raise_for_access(datasource=datasource)
+        except SupersetSecurityException:

Review comment:
       If there's a different exception thrown, then this fails open. Is that secure?




----------------------------------------------------------------
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