feat(datasets): security perm simplification (#12000)

* feat(datasets): security perm simplification

* feat(datasets): security perm simplification

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* include SqlMetricInlineView converge and fix JS tests

* update to current alembic revision
This commit is contained in:
Daniel Vaz Gaspar
2020-12-16 11:49:03 +00:00
committed by GitHub
parent 9c8b65d03f
commit 2302adb61a
9 changed files with 154 additions and 31 deletions

View File

@@ -33,7 +33,7 @@ from superset import event_logger, is_feature_enabled
from superset.commands.exceptions import CommandInvalidError
from superset.commands.importers.v1.utils import remove_root
from superset.connectors.sqla.models import SqlaTable
from superset.constants import RouteMethod
from superset.constants import MODEL_API_RW_METHOD_PERMISSION_MAP, RouteMethod
from superset.databases.filters import DatabaseFilter
from superset.datasets.commands.bulk_delete import BulkDeleteDatasetCommand
from superset.datasets.commands.create import CreateDatasetCommand
@@ -79,7 +79,8 @@ class DatasetRestApi(BaseSupersetModelRestApi):
resource_name = "dataset"
allow_browser_login = True
class_permission_name = "TableModelView"
class_permission_name = "Dataset"
method_permission_name = MODEL_API_RW_METHOD_PERMISSION_MAP
include_route_methods = RouteMethod.REST_MODEL_VIEW_CRUD_SET | {
RouteMethod.EXPORT,
RouteMethod.IMPORT,