allow owners to edit chart title (#17047)

This commit is contained in:
Ben Elgren 2021-10-26 03:58:07 -06:00 committed by GitHub
parent 48fd3c185c
commit 3641093a44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -224,7 +224,13 @@ export class ExploreChartHeader extends React.PureComponent {
<div className="title-panel">
<EditableTitle
title={this.getSliceName()}
canEdit={!this.props.slice || this.props.can_overwrite}
canEdit={
!this.props.slice ||
this.props.can_overwrite ||
(this.props.slice?.owners || []).includes(
this.props?.user?.userId,
)
}
onSaveTitle={this.props.actions.updateChartTitle}
/>