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 2018/11/01 01:16:16 UTC

[GitHub] xtinec commented on a change in pull request #6220: [SIP-5] Open a new /api/v1/query endpoint that takes query_obj

xtinec commented on a change in pull request #6220: [SIP-5] Open a new /api/v1/query endpoint that takes query_obj
URL: https://github.com/apache/incubator-superset/pull/6220#discussion_r229862951
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1109,29 +1116,27 @@ def get_samples(self, viz_obj):
             'data': viz_obj.get_samples(),
         })
 
+    def check_datasource_permission(self, datasource, user=None):
+        if not security_manager.datasource_access(datasource, user):
+            return json_error_response(
 
 Review comment:
   It was returning an error json previously, specifically with a 401. I can change this to a `raise`, deck out `SupersetSecurityException` with the details and extend the new `handle_superset_exception` decorator to catch `SupersetSecurityException` and handle it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org