fix(sqllab): add authorization check to query cost estimation (#38648)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Shaitan
2026-03-24 12:57:02 +00:00
committed by GitHub
parent ed3c5280a9
commit 962abf6904
2 changed files with 147 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ from typing import Any, TypedDict
from flask import current_app as app
from flask_babel import gettext as __
from superset import db
from superset import db, security_manager
from superset.commands.base import BaseCommand
from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
from superset.exceptions import SupersetErrorException, SupersetTimeoutException
@@ -67,6 +67,7 @@ class QueryEstimationCommand(BaseCommand):
),
status=404,
)
security_manager.raise_for_access(database=self._database)
def run(
self,