fix: 监控接口/load和/system-info和/cache去除权限标识限制

This commit is contained in:
TsMask
2025-02-06 14:32:42 +08:00
parent 279f814674
commit 0b94281520

View File

@@ -23,14 +23,15 @@ func Setup(router *gin.Engine) {
monitorGroup := router.Group("/monitor") monitorGroup := router.Group("/monitor")
{ {
monitorGroup.GET("/load", monitorGroup.GET("/load",
// middleware.PreAuthorize(nil), middleware.PreAuthorize(nil),
controller.NewMonitor.Load, controller.NewMonitor.Load,
) )
} }
// 服务器服务信息 // 服务器服务信息
router.GET("/monitor/system-info", router.GET("/monitor/system-info",
middleware.PreAuthorize(map[string][]string{"hasPerms": {"monitor:system:info"}}), // middleware.PreAuthorize(map[string][]string{"hasPerms": {"monitor:system:info"}}),
middleware.PreAuthorize(nil),
controller.NewSystemInfo.Info, controller.NewSystemInfo.Info,
) )
@@ -38,7 +39,8 @@ func Setup(router *gin.Engine) {
sysCacheGroup := router.Group("/monitor/cache") sysCacheGroup := router.Group("/monitor/cache")
{ {
sysCacheGroup.GET("", sysCacheGroup.GET("",
middleware.PreAuthorize(map[string][]string{"hasPerms": {"monitor:cache:info"}}), // middleware.PreAuthorize(map[string][]string{"hasPerms": {"monitor:cache:info"}}),
middleware.PreAuthorize(nil),
controller.NewSysCache.Info, controller.NewSysCache.Info,
) )
sysCacheGroup.GET("/getNames", sysCacheGroup.GET("/getNames",