fix: Refactor ownership checks and ensure consistency (#20499)

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2022-07-07 11:04:27 -07:00
committed by GitHub
parent e7b965a3b2
commit f0ca158989
107 changed files with 614 additions and 807 deletions

View File

@@ -16,7 +16,7 @@
# under the License.
import logging
from flask import g, Response
from flask import Response
from flask_appbuilder.api import expose, permission_name, protect, safe
from flask_appbuilder.models.sqla.interface import SQLAInterface
@@ -91,7 +91,7 @@ class DatasetColumnsRestApi(BaseSupersetModelRestApi):
$ref: '#/components/responses/500'
"""
try:
DeleteDatasetColumnCommand(g.user, pk, column_id).run()
DeleteDatasetColumnCommand(pk, column_id).run()
return self.response(200, message="OK")
except DatasetColumnNotFoundError:
return self.response_404()