michael-s-molina commented on code in PR #19981:
URL: https://github.com/apache/superset/pull/19981#discussion_r870516884


##########
superset/explore/utils.py:
##########
@@ -24,15 +24,24 @@
     ChartNotFoundError,
 )
 from superset.charts.dao import ChartDAO
+from superset.commands.exceptions import DatasourceNotFoundValidationError
 from superset.datasets.commands.exceptions import (
     DatasetAccessDeniedError,
     DatasetNotFoundError,
 )
 from superset.datasets.dao import DatasetDAO
+from superset.utils.core import DatasourceType
 from superset.views.base import is_user_admin
 from superset.views.utils import is_owner
 
 
+def check_datasource_access(datasource_id: int, datasource_type: str) -> 
Optional[bool]:
+    if datasource_id:
+        if datasource_type == DatasourceType.TABLE:

Review Comment:
   I'm not sure if `check_dataset_access` depends on the `datasource_type`. 
Shouldn’t the check occur independently of the data source type?



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

To unsubscribe, e-mail: [email protected]

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