正在显示
1 个修改的文件
包含
10 行增加
和
10 行删除
@@ -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 | } |
-
请 注册 或 登录 后发表评论