You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2019/03/14 21:01:18 UTC
[incubator-superset] 01/01: Update datasource.py
This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a commit to branch john-bodley--remove-check-ownership-on-datasource-save
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit e98cc0e485eb58b7bd0903855bbfbf5ff51fcdbb
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Thu Mar 14 14:01:01 2019 -0700
Update datasource.py
---
superset/views/datasource.py | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/superset/views/datasource.py b/superset/views/datasource.py
index eda4e8f..1c388f8 100644
--- a/superset/views/datasource.py
+++ b/superset/views/datasource.py
@@ -25,7 +25,7 @@ from flask_babel import gettext as __
from superset import appbuilder, db
from superset.connectors.connector_registry import ConnectorRegistry
from superset.models.core import Database
-from .base import BaseSupersetView, check_ownership, json_error_response
+from .base import BaseSupersetView, json_error_response
class Datasource(BaseSupersetView):
@@ -39,14 +39,6 @@ class Datasource(BaseSupersetView):
orm_datasource = ConnectorRegistry.get_datasource(
datasource_type, datasource_id, db.session)
- if not check_ownership(orm_datasource, raise_if_false=False):
- return json_error_response(
- __(
- 'You are not authorized to modify '
- 'this data source configuration'),
- status='401',
- )
-
if 'owners' in datasource:
datasource['owners'] = db.session.query(orm_datasource.owner_class).filter(
orm_datasource.owner_class.id.in_(datasource['owners'])).all()