mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
LibraryPanels: Fix issue where viewer with folder edit permissions could not update library panel (#58420)
* LibraryPanels: Fix issue where viewer with folder edit permissions could not update library panel
This commit is contained in:
parent
062c5b805c
commit
850f5fa8d7
@ -90,9 +90,10 @@ export async function addLibraryPanel(
|
|||||||
|
|
||||||
export async function updateLibraryPanel(panelSaveModel: PanelModelWithLibraryPanel): Promise<LibraryElementDTO> {
|
export async function updateLibraryPanel(panelSaveModel: PanelModelWithLibraryPanel): Promise<LibraryElementDTO> {
|
||||||
const { libraryPanel, ...model } = panelSaveModel;
|
const { libraryPanel, ...model } = panelSaveModel;
|
||||||
const { uid, name, version } = libraryPanel;
|
const { uid, name, version, folderUid } = libraryPanel;
|
||||||
const kind = LibraryElementKind.Panel;
|
const kind = LibraryElementKind.Panel;
|
||||||
const { result } = await getBackendSrv().patch(`/api/library-elements/${uid}`, {
|
const { result } = await getBackendSrv().patch(`/api/library-elements/${uid}`, {
|
||||||
|
folderUid,
|
||||||
name,
|
name,
|
||||||
model,
|
model,
|
||||||
version,
|
version,
|
||||||
|
Loading…
Reference in New Issue
Block a user