|
|
@ -2,6 +2,7 @@ package casbins |
|
|
|
|
|
|
|
import ( |
|
|
|
"SSW_WebPlatform/conf" |
|
|
|
"SSW_WebPlatform/utils" |
|
|
|
"SSW_WebPlatform/web/middleware/glog" |
|
|
|
"SSW_WebPlatform/web/middleware/jwts" |
|
|
|
"SSW_WebPlatform/web/supports" |
|
|
@ -27,8 +28,8 @@ func NewCasbin() (*casbin.Enforcer, error) { |
|
|
|
glog.InfoExtln("casbins数据库连接错误", "err:", err) |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
|
|
|
|
e, err := casbin.NewEnforcer("conf/rbac_model.conf", a) |
|
|
|
path, _ := utils.GetCurrentPath("conf/rbac_model.conf") |
|
|
|
e, err := casbin.NewEnforcer(path, a) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|