mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -294,7 +294,7 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
folderRoute.Group("/:uid", func(folderUidRoute routing.RouteRegister) {
|
||||
folderUidRoute.Get("/", routing.Wrap(GetFolderByUID))
|
||||
folderUidRoute.Put("/", bind(models.UpdateFolderCommand{}), routing.Wrap(UpdateFolder))
|
||||
folderUidRoute.Delete("/", routing.Wrap(DeleteFolder))
|
||||
folderUidRoute.Delete("/", routing.Wrap(hs.DeleteFolder))
|
||||
|
||||
folderUidRoute.Group("/permissions", func(folderPermissionRoute routing.RouteRegister) {
|
||||
folderPermissionRoute.Get("/", routing.Wrap(hs.GetFolderPermissionList))
|
||||
|
||||
Reference in New Issue
Block a user