【删除多余代码】

This commit is contained in:
weizhihong 2023-08-30 15:39:26 +08:00
parent 7e7f2109d2
commit ad88f64f7e
1 changed files with 1 additions and 3 deletions

View File

@ -33,9 +33,7 @@ func permissionMiddleware() gin.HandlerFunc {
c.Next() c.Next()
} else { } else {
path, method := c.Request.URL.Path, c.Request.Method path, method := c.Request.URL.Path, c.Request.Method
zap.S().Debugf("获取请求路径:%s, 方法:%s", path, method) if validateUserPath(path, method, userAuth.AuthPaths) { // 用户有权限
isVaild := validateUserPath(path, method, userAuth.AuthPaths)
if isVaild { // 用户有权限
c.Next() c.Next()
} else { } else {
zap.S().Errorf("无权限操作请求路径:%s, 方法:%s", path, method) zap.S().Errorf("无权限操作请求路径:%s, 方法:%s", path, method)