From 1af31847fa1119e513fe68d611762bee875c07a4 Mon Sep 17 00:00:00 2001 From: icey-yu <119291641+icey-yu@users.noreply.github.com> Date: Fri, 27 Dec 2024 16:23:12 +0800 Subject: [PATCH] fix: restart permission check (#3011) --- internal/api/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/router.go b/internal/api/router.go index 789b8205d5..5c4fa21370 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -314,7 +314,7 @@ func newGinRouter(ctx context.Context, client discovery.SvcDiscoveryRegistry, cf configGroup.POST("/reset_config", cm.ResetConfig) } { - r.POST("/restart", cm.Restart) + r.POST("/restart", cm.CheckAdmin, cm.Restart) } return r, nil }