package middleware import ( "github.com/gin-gonic/gin" ) // CheckBaseAuth 基本权限校验 func CheckBaseAuth() gin.HandlerFunc { return func(c *gin.Context) { //userInfo := user.GetInfoByClaims(c) // //ok, checkInfo, _, err := company.CheckBaseFiccPermission(userInfo.CompanyID, int(userInfo.UserID)) //if err != nil { // resp.FailMsg("用户权限验证失败", "CheckBaseAuth-用户权限验证失败" + err.Error(), c) // c.Abort() // return //} //if !ok { // resp.AuthError(checkInfo, "暂无权限", c) // c.Abort() // return //} c.Next() } }