作者 tangxvhui

调试

@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 "oppmg/utils/exceltool" 8 "oppmg/utils/exceltool"
9 "strconv" 9 "strconv"
10 10
11 - // serveauth "oppmg/services/auth" 11 + serveauth "oppmg/services/auth"
12 12
13 "github.com/astaxie/beego" 13 "github.com/astaxie/beego"
14 "github.com/astaxie/beego/context" 14 "github.com/astaxie/beego/context"
@@ -31,15 +31,15 @@ func (this *BaseController) Prepare() { @@ -31,15 +31,15 @@ func (this *BaseController) Prepare() {
31 return 31 return
32 } 32 }
33 33
34 - // p := fmt.Sprint(this.Ctx.Input.GetData("RouterPattern"))  
35 - // userid := this.GetUserId()  
36 - // companyid := this.GetCompanyId()  
37 - // ok := serveauth.ValidUserPermission(p, userid, companyid)  
38 - // if !ok {  
39 - // msg := protocol.NewMessage("10080")  
40 - // this.ResposeJson(msg)  
41 - // return  
42 - // } 34 + p := fmt.Sprint(this.Ctx.Input.GetData("RouterPattern"))
  35 + userid := this.GetUserId()
  36 + companyid := this.GetCompanyId()
  37 + ok := serveauth.ValidUserPermission(p, userid, companyid)
  38 + if !ok {
  39 + msg := protocol.NewMessage("10080")
  40 + this.ResposeJson(msg)
  41 + return
  42 + }
43 //权限校验 43 //权限校验
44 return 44 return
45 } 45 }