正在显示
1 个修改的文件
包含
11 行增加
和
13 行删除
@@ -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" |
@@ -30,18 +30,16 @@ func (this *BaseController) Prepare() { | @@ -30,18 +30,16 @@ func (this *BaseController) Prepare() { | ||
30 | this.Ctx.WriteString("") | 30 | this.Ctx.WriteString("") |
31 | return | 31 | return |
32 | } | 32 | } |
33 | - // if beego.BConfig.RunMode == "dev" { | ||
34 | - // return | ||
35 | - // } | ||
36 | - // p := fmt.Sprint(this.Ctx.Input.GetData("RouterPattern")) | ||
37 | - // userid := this.GetUserId() | ||
38 | - // companyid := this.GetCompanyId() | ||
39 | - // ok := serveauth.ValidUserPermission(p, userid, companyid) | ||
40 | - // if !ok { | ||
41 | - // msg := protocol.NewMessage("10080") | ||
42 | - // this.ResposeJson(msg) | ||
43 | - // return | ||
44 | - // } | 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 | + } | ||
45 | //权限校验 | 43 | //权限校验 |
46 | return | 44 | return |
47 | } | 45 | } |
-
请 注册 或 登录 后发表评论