From f2e38132e0003f2319e06bc5dbf68f7065a1f8f7 Mon Sep 17 00:00:00 2001 From: Doflatango Date: Wed, 19 Sep 2018 22:55:38 +0800 Subject: [PATCH] Fixed api GET /nodes permission, can be access by Reporter --- web/routers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/routers.go b/web/routers.go index 21ba501..28f96fa 100644 --- a/web/routers.go +++ b/web/routers.go @@ -87,7 +87,7 @@ func initRouters() (s *http.Server, err error) { h = NewAuthHandler(jobLogHandler.GetDetail, cronsun.Developer) subrouter.Handle("/log/{id}", h).Methods("GET") - h = NewAuthHandler(nodeHandler.GetNodes, cronsun.Developer) + h = NewAuthHandler(nodeHandler.GetNodes, cronsun.Reporter) subrouter.Handle("/nodes", h).Methods("GET") h = NewAuthHandler(nodeHandler.DeleteNode, cronsun.Developer) subrouter.Handle("/node/{ip}", h).Methods("DELETE")