From 9a2969fb4ff2fd814e1c05fa21f4c4c83ddbaeaf Mon Sep 17 00:00:00 2001 From: Ieva Date: Tue, 9 Apr 2024 17:09:41 +0100 Subject: [PATCH] RBAC: hide save button for users who can't save dashboard (#85758) hide save button for users who can't save dashboard --- .../components/PanelEditor/PanelEditor.tsx | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx index 1577591e4bc..1bbe5fd4e9e 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx @@ -333,27 +333,28 @@ export class PanelEditorUnconnected extends PureComponent { > Discard , - this.props.panel.libraryPanel ? ( - - ) : ( - - ), + this.props.dashboard.meta.canSave && + (this.props.panel.libraryPanel ? ( + + ) : ( + + )),