作者 tangxvhui

调试

... ... @@ -8,7 +8,7 @@ import (
"oppmg/utils/exceltool"
"strconv"
// serveauth "oppmg/services/auth"
serveauth "oppmg/services/auth"
"github.com/astaxie/beego"
"github.com/astaxie/beego/context"
... ... @@ -30,18 +30,16 @@ func (this *BaseController) Prepare() {
this.Ctx.WriteString("")
return
}
// if beego.BConfig.RunMode == "dev" {
// return
// }
// p := fmt.Sprint(this.Ctx.Input.GetData("RouterPattern"))
// userid := this.GetUserId()
// companyid := this.GetCompanyId()
// ok := serveauth.ValidUserPermission(p, userid, companyid)
// if !ok {
// msg := protocol.NewMessage("10080")
// this.ResposeJson(msg)
// return
// }
p := fmt.Sprint(this.Ctx.Input.GetData("RouterPattern"))
userid := this.GetUserId()
companyid := this.GetCompanyId()
ok := serveauth.ValidUserPermission(p, userid, companyid)
if !ok {
msg := protocol.NewMessage("10080")
this.ResposeJson(msg)
return
}
//权限校验
return
}
... ...