LibraryPanels: Deletes library panels during folder deletion (#31572)
* Refactor: adds permissions for library panel creation * Refactor: checks folder permissions for patch requests * Chore: changes after PR comments * Refactor: adds permissions to delete * Refactor: moves get all permission tests out of get all tests * Chore: move out get all tests to a separate file * Refactor: adds permissions to get handler * Refactor: fixes a bug with getting library panels in General folder * Refactor: adds permissions for connect/disconnect * Refactor: adds permissions and tests for get connected dashboards * Tests: adds tests for connected dashboards in General Folder * LibraryPanels: Deletes library panels during folder deletion * LibraryPanels: Deletes library panels during folder deletion * Update pkg/api/folder.go Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> * Update pkg/services/librarypanels/librarypanels_permissions_test.go Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com> * Chore: updates after PR comments * Chore: forgot to change some function signatures Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
co-authored by
Arve Knudsen
parent
e13a48166b
commit
4bc6a7c407
@@ -96,6 +96,8 @@ var (
|
||||
errLibraryPanelHeaderUIDMissing = errors.New("library panel header is missing required property uid")
|
||||
// errLibraryPanelHeaderNameMissing is an error for when a library panel header is missing the name property.
|
||||
errLibraryPanelHeaderNameMissing = errors.New("library panel header is missing required property name")
|
||||
// ErrFolderHasConnectedLibraryPanels is an error for when an user deletes a folder that contains connected library panels.
|
||||
ErrFolderHasConnectedLibraryPanels = errors.New("folder contains library panels that are linked to dashboards")
|
||||
)
|
||||
|
||||
// Commands
|
||||
|
||||
Reference in New Issue
Block a user