You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mistercrunch (via GitHub)" <gi...@apache.org> on 2026/04/20 22:14:31 UTC

Re: [PR] feat(semantic layers): UI for editing semantic views [superset]

mistercrunch commented on PR #38365:
URL: https://github.com/apache/superset/pull/38365#issuecomment-4284617332

   ### Blockers
   
   1. **RBAC bypass** — `daos/datasource.py` `build_semantic_view_query` has no per-object access filter; `build_dataset_query` does. Any user with `can_read SemanticView` sees every SV in the deployment.
   2. **`/api/v1/datasource/` now serves the dataset list even with `SEMANTIC_LAYERS` off.** `DatasetListSchema` is narrower than `DatasetRestApi.list_columns`: `extra` typed as `String` (should be `Raw`/`Dict`), and missing `is_managed_externally`, `catalog`, `default_endpoint`, `is_sqllab_view`. Either keep flag-off on `/dataset/`, or audit the schema.
   3. **Type-filter contract mismatch** — frontend sends `opr=DatasetIsNullOrEmpty` + `value='semantic_view'`; `_parse_filters` ignores `opr`. Works by accident.
   4. **No backend tests** for `GetCombinedDatasourceListCommand`, `_parse_filters`, `_resolve_source_type`, or the `build_*_query` helpers. Given (1), at least add an RBAC regression test.
   
   ### Suggestions
   
   - `DatasetList/index.tsx`: `currentSourceFilter` is set inside `fetchData` and feeds `filterTypes` — risk of feedback loop. Derive from `lastFetchConfig`.
   - `daos/datasource.py`: `ilike(f"%{name_filter}%")` doesn't escape `%`/`_`.
   - `commands/datasource/list.py`: `sort_col_map` silently falls back to `changed_on` on unknown columns — raise 400.
   - `SemanticViewEditModal.tsx`: bare `catch {}`, one-off `styled.div`, `DatasetType` cast hides a real type mismatch. No tests.
   - `DatasetList/index.tsx`: several new `Cell: (... : any)` — please type while touching.
   - Actions `Cell` `isSemanticView` early-return silently hides delete/export. Intentional or placeholder needed?
   - New endpoint + new feature flag → `UPDATING.md` note.
   
   ### Questions
   
   1. Intended RBAC model for SVs — schema-level, owner-based, or admin-only for beta?
   2. Is routing the flag-off path through `/api/v1/datasource/` deliberate?
   3. Plan to retire `/api/v1/dataset/?q=…` long-term?
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org