优化结构
This commit is contained in:
@@ -22,6 +22,11 @@ func AccessControl(runtime *conf.Runtime, access accessController) gin.HandlerFu
|
||||
NoAuth(c, "未登录或非法访问")
|
||||
return
|
||||
}
|
||||
if access == nil {
|
||||
Write(c, CodeError, gin.H{}, "权限服务不可用")
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
path := c.Request.URL.Path
|
||||
policyPath := path
|
||||
if config := runtime.Admin(); config != nil {
|
||||
|
||||
Reference in New Issue
Block a user