From ad88f64f7e50cf62aaf0a19b351391a57a11c11e Mon Sep 17 00:00:00 2001 From: weizhihong Date: Wed, 30 Aug 2023 15:39:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- middleware/auth.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/middleware/auth.go b/middleware/auth.go index d20faaa..ee65926 100644 --- a/middleware/auth.go +++ b/middleware/auth.go @@ -33,9 +33,7 @@ func permissionMiddleware() gin.HandlerFunc { c.Next() } else { path, method := c.Request.URL.Path, c.Request.Method - zap.S().Debugf("获取请求路径:%s, 方法:%s", path, method) - isVaild := validateUserPath(path, method, userAuth.AuthPaths) - if isVaild { // 用户有权限 + if validateUserPath(path, method, userAuth.AuthPaths) { // 用户有权限 c.Next() } else { zap.S().Errorf("无权限操作请求路径:%s, 方法:%s", path, method)