Commit Graph
7 Commits
Author SHA1 Message Date
rusackasandClaude Opus 4.8 ddf32a242f fix(explore): require chart write permission for Edit chart properties
canModifySlice alone let an editor who lacks can_write on Chart see
"Edit chart properties", even though ChartRestApi.put (and
restore_version) require that permission at the route level and would
turn the request away. Gate that menu item on state.explore.can_add as
well, matching what the API actually enforces. Version history is left
on canModifySlice alone since its own listing endpoints only need read
access; only its restore action needs write, and that's already
enforced server-side.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-05 11:54:17 -07:00
Claude Code 9889712be4 fix(explore): fix test typing gap and restore permission for pre-existing tests (#38884)
The prior commit's test fixture for useExploreAdditionalActionsMenu.test.tsx
passed slice.editors through an untyped object literal, which TypeScript's
excess-property check rejected once compiled for real -- the production
Slice type already declares editors, so this was purely a test-fixture
typing gap; fixed by explicitly typing the fixture as Slice.

Also updates three pre-existing ExploreChartHeader tests that exercised
"Edit chart properties" without previously needing an explicit permission
grant, since nothing gated that path before this issue's fix. They now set
can_overwrite: true in the Redux initialState they already render with,
matching how the fix's new permission check actually reads that signal.

type-checking-frontend skipped: this worktree lacks the prebuilt
lib/*.d.ts output the full project type-check needs. jest, oxlint,
custom-rules, and stylelint all pass on the changed files.
2026-08-04 15:44:46 -07:00
Claude Code 6a93104e55 fix(explore): hide edit-properties menu item for non-owner/non-editor users
The "Edit chart properties" menu item rendered unconditionally whenever a
chart was loaded, with no ownership/editor check, even though
UpdateChartCommand already rejects the save server-side for a user without
write access -- letting a user open a modal for an edit they can never
persist. Gate it the same way ExploreChartHeader already gates its
editable-title affordance: visible when the user can overwrite the chart,
or is listed in the chart's editors.

type-checking-frontend skipped: this worktree lacks the prebuilt lib/
artifacts it needs to run; oxfmt/oxlint/custom-rules/stylelint all pass.

Fixes #38884
2026-08-04 15:44:42 -07:00
Claude Code 1a418ccf82 test(explore): pin edit-properties menu gating for non-owner Alpha users (#38884)
useExploreAdditionalActionsMenu shows the "Edit chart properties" menu
item whenever a slice exists, with no check against the current user's
ownership/editor rights on it -- so a user who can open the modal but
whose UpdateChartCommand save will be rejected server-side still sees a
fully-clickable "Edit chart properties" entry (dosubot pinned the same
root cause: the frontend gate is missing while the backend enforces
ownership correctly, and ExploreChartHeader's own title-edit affordance
already gates on the equivalent editors/user_subjects check this menu
item lacks).

Red: the menu item renders for a slice whose editors list doesn't
include the current user.

`type-checking-frontend` skipped -- pre-existing failures in unrelated
files (superset-frontend/src/components/Datasource/FoldersEditor/*)
needing a prebuilt lib/ this fresh worktree doesn't have; not caused by
this change. oxlint/custom-rules/stylelint all pass on the changed file.
2026-08-04 15:42:52 -07:00
e103d92b48 feat(versioning): version-history UI (#41551)
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Mike Bridge <michael.bridge@ext.preset.io>
2026-08-04 12:37:46 -07:00
7953382d10 feat(submenu_export): Add export to png and pdf options for charts (#38535)
Co-authored-by: Ramiro Aquino Romero <ramiroaquinoromero@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Joe Li <joe@preset.io>
Co-authored-by: Claude <claude@anthropic.com>
2026-07-14 21:21:12 -07:00
6f12d17313 fix(charts): show user-friendly error for HTTP 413 payload too large (#37131)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
2026-06-24 11:21:59 -07:00