Browse Source

fix: viewer role fix, fixes #8976

Torkel Ödegaard 8 năm trước cách đây
mục cha
commit
3dc9d76b38
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      pkg/api/api.go

+ 2 - 1
pkg/api/api.go

@@ -222,7 +222,8 @@ func (hs *HttpServer) registerRoutes() {
 
 		// Dashboard
 		r.Group("/dashboards", func() {
-			r.Combo("/db/:slug").Get(GetDashboard).Delete(DeleteDashboard)
+			r.Get("/db/:slug", GetDashboard)
+			r.Delete("/db/:slug", reqEditorRole, DeleteDashboard)
 
 			r.Get("/id/:dashboardId/versions", wrap(GetDashboardVersions))
 			r.Get("/id/:dashboardId/versions/:id", wrap(GetDashboardVersion))