You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2023/07/10 18:18:13 UTC
[GitHub] [superset] michael-s-molina commented on a diff in pull request #24630: fix: Chart can be added to dashboard by non-owner via save as option
michael-s-molina commented on code in PR #24630:
URL: https://github.com/apache/superset/pull/24630#discussion_r1258675345
##########
superset-frontend/src/explore/components/SaveModal.tsx:
##########
@@ -125,7 +125,9 @@ class SaveModal extends React.Component<SaveModalProps, SaveModalState> {
if (dashboardId) {
try {
const result = await this.loadDashboard(dashboardId);
- if (result) {
+ if (
+ result?.owners.some((owner: any) => owner.id === this.props.userId)
Review Comment:
Why do we need this check? Shouldn't `loadDashboard` return `null` if the user does not have access to the dashboard?
--
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