From e9491703550b3d4359766a99ab424759e2450f4a Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Wed, 13 Jan 2021 12:20:06 +0000 Subject: [PATCH] partially protect the old MVC also --- superset/connectors/sqla/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/superset/connectors/sqla/views.py b/superset/connectors/sqla/views.py index a9ae564e34d4e..7406f6e8b7933 100644 --- a/superset/connectors/sqla/views.py +++ b/superset/connectors/sqla/views.py @@ -37,6 +37,7 @@ from superset.typing import FlaskResponse from superset.utils import core as utils from superset.views.base import ( + check_ownership, create_table_permissions, DatasourceFilter, DeleteMixin, @@ -459,6 +460,9 @@ class TableModelView( # pylint: disable=too-many-ancestors def pre_add(self, item: "TableModelView") -> None: validate_sqlatable(item) + def pre_update(self, item: "TableModelView") -> None: + check_ownership(item) + def post_add( # pylint: disable=arguments-differ self, item: "TableModelView",