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/18 16:57:20 UTC
[incubator-superset] branch master updated: [datasource] Ensuring
consistent behavior of datasource editing/saving. (#7037)
This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new c771625 [datasource] Ensuring consistent behavior of datasource editing/saving. (#7037)
c771625 is described below
commit c771625f1068d3a7f41e6bced14b0cbdbf9962cc
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Mon Mar 18 09:56:52 2019 -0700
[datasource] Ensuring consistent behavior of datasource editing/saving. (#7037)
* Update datasource.py
* Update datasource.py
---
superset/views/datasource.py | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/superset/views/datasource.py b/superset/views/datasource.py
index eda4e8f..43e8c42 100644
--- a/superset/views/datasource.py
+++ b/superset/views/datasource.py
@@ -20,12 +20,11 @@ import json
from flask import request
from flask_appbuilder import expose
from flask_appbuilder.security.decorators import has_access_api
-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 +38,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()