mikebridge commented on code in PR #45146:
URL: https://github.com/apache/superset/pull/45146#discussion_r4235496399
##########
docs/docs/using-superset/exploring-data.mdx:
##########
@@ -128,6 +128,10 @@ To save the visualization, click on **Save** in the top
left of the screen. In t
- Select **Add To Dashboard** and enter
Tutorial Dashboard. Finally, select **Save & Go To Dashboard**.
+For an existing chart, chart editors (including extra editors and
administrators)
+can edit its title in Explore and save the change. Externally managed charts
and
Review Comment:
Matched the properties editor: saved-chart titles now require both
editorship and Chart write permission (`can_add`). The docs say so, and a
regression test covers an extra editor with read-only permission.
##########
superset-frontend/src/explore/components/ExploreChartHeader/index.tsx:
##########
@@ -291,19 +291,17 @@ const ExploreChartHeader: FC<ExploreChartHeaderProps> = ({
}
}, [showUnsavedChangesModal, shouldForceCloseModal]);
- const userSubjects = useMemo(
- () => new Set(getBootstrapData()?.common?.user_subjects ?? []),
- [],
- );
-
const editableTitleProps = useMemo(
() => ({
title: sliceName ?? '',
canEdit:
!isVersionPreviewActive &&
(!slice ||
- canOverwrite ||
- Boolean(slice?.editors?.some(editor => userSubjects.has(editor)))),
+ canOverwriteSlice({
Review Comment:
Added a small guard at the header boundary that removes malformed editor IDs
before the title and additional-actions predicates run. The `[null]`
properties-save shape now renders without throwing, while valid extra-editor
grants still work. The underlying reducer conversion can be handled separately.
--
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]