mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
RBAC: hide save button for users who can't save dashboard (#85758)
hide save button for users who can't save dashboard
This commit is contained in:
@@ -333,27 +333,28 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
|
||||
>
|
||||
Discard
|
||||
</Button>,
|
||||
this.props.panel.libraryPanel ? (
|
||||
<Button
|
||||
onClick={this.onSaveLibraryPanel}
|
||||
variant="primary"
|
||||
size={size}
|
||||
title="Apply changes and save library panel"
|
||||
key="save-panel"
|
||||
>
|
||||
Save library panel
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
onClick={this.onSaveDashboard}
|
||||
title="Apply changes and save dashboard"
|
||||
key="save"
|
||||
size={size}
|
||||
variant="secondary"
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
),
|
||||
this.props.dashboard.meta.canSave &&
|
||||
(this.props.panel.libraryPanel ? (
|
||||
<Button
|
||||
onClick={this.onSaveLibraryPanel}
|
||||
variant="primary"
|
||||
size={size}
|
||||
title="Apply changes and save library panel"
|
||||
key="save-panel"
|
||||
>
|
||||
Save library panel
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
onClick={this.onSaveDashboard}
|
||||
title="Apply changes and save dashboard"
|
||||
key="save"
|
||||
size={size}
|
||||
variant="secondary"
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
)),
|
||||
<Button
|
||||
onClick={this.onBack}
|
||||
variant="primary"
|
||||
|
||||
Reference in New Issue
Block a user