作者 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 }
@@ -128,6 +128,7 @@ func GetUserPermission(userid int64, field string) (rbac.PermissionOptionObject, @@ -128,6 +128,7 @@ func GetUserPermission(userid int64, field string) (rbac.PermissionOptionObject,
128 if err != nil { 128 if err != nil {
129 return nil, err 129 return nil, err
130 } 130 }
  131 + log.Info("Redis DATA===>%s", str)
131 var permissionObj rbac.PermissionOptionObject 132 var permissionObj rbac.PermissionOptionObject
132 fn, ok := rbac.CodePermissionObject[field] 133 fn, ok := rbac.CodePermissionObject[field]
133 if !ok { 134 if !ok {