aminghadersohi commented on PR #40343:
URL: https://github.com/apache/superset/pull/40343#issuecomment-4568322390
Synced latest changes from #40344 and #40348 — applied all cross-applicable
updates.
**Changes applied in commit `440adee686`:**
- **`get_schema` permission fix** (mirrors `dac10c249078`/`de2a1d9b3491`
from #40348): replaced the static `class_permission_name="Dataset"` on the
`@tool` decorator with a `_MODEL_TYPE_CLASS_PERMISSION` dict and per-model-type
inline RBAC check. Schema discovery for `css_template` is now gated by
`CssTemplate` permission and `theme` by `Theme` permission, rather than
incorrectly requiring `Dataset` access.
- **Error field sanitization** (mirrors `dac10c249078` from #40348): added
`@field_validator("error")` to `CssTemplateError` and `ThemeError` to wrap
error text in `UNTRUSTED-CONTENT` delimiters before LLM exposure.
- **Tests**: added `TestGetSchemaPermissionMap` verifying
`css_template`/`theme` entries and that `_MODEL_TYPE_CLASS_PERMISSION` has full
parity with `_SCHEMA_CORE_FACTORIES`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]