Files
superset2/tests
Amin Ghadersohi a5d0205568 fix(mcp): fix MCPPermissionDeniedError handler order and visibility test patch targets
MCPPermissionDeniedError(PermissionError) was being caught by the generic
PermissionError branch in _handle_error before reaching its own handler,
so the ToolError message was sanitized to "You don't have access to this
resource." instead of the structured permission message.

Move the MCPPermissionDeniedError branch above PermissionError so the
subclass is matched first.

Also fix four visibility test patch targets: auth.py imports
security_manager at module level via `from superset import security_manager`,
so tests must patch `superset.mcp_service.auth.security_manager` (not
`superset.security_manager`) to intercept calls inside auth.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 21:03:18 +00:00
..