【删除多余代码】
This commit is contained in:
parent
7e7f2109d2
commit
ad88f64f7e
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue