mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06: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:
parent
27bc0c19ab
commit
9a2969fb4f
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user