- casbin model文件移到conf下
This commit is contained in:
@@ -21,8 +21,8 @@
|
|||||||
backup: yes
|
backup: yes
|
||||||
- name: copy conf file to dest
|
- name: copy conf file to dest
|
||||||
copy:
|
copy:
|
||||||
src: ../conf/app.conf
|
src: ../conf/
|
||||||
dest: "{{ deploy_dir }}/conf/app.conf"
|
dest: "{{ deploy_dir }}/conf/"
|
||||||
owner: ubuntu
|
owner: ubuntu
|
||||||
group: ubuntu
|
group: ubuntu
|
||||||
mode: 0555
|
mode: 0555
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package api2
|
|||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/jx-callback/business/authz"
|
"git.rosy.net.cn/jx-callback/business/authz"
|
||||||
"git.rosy.net.cn/jx-callback/business/authz/casbinauth"
|
"git.rosy.net.cn/jx-callback/business/authz/casbinauth"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -10,5 +11,10 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Init() {
|
func Init() {
|
||||||
RoleMan, _ = casbinauth.New("business/authz/casbinauth/rbac_model.conf")
|
RoleMan2, err := casbinauth.New("conf/rbac_model.conf")
|
||||||
|
if err != nil {
|
||||||
|
globals.SugarLogger.Error(err.Error())
|
||||||
|
} else {
|
||||||
|
RoleMan = RoleMan2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -47,7 +47,9 @@ var (
|
|||||||
|
|
||||||
func Init() {
|
func Init() {
|
||||||
beegodb.Init()
|
beegodb.Init()
|
||||||
api2.Init()
|
if globals.EnableWXAuth2 {
|
||||||
|
api2.Init()
|
||||||
|
}
|
||||||
|
|
||||||
defsch.Init()
|
defsch.Init()
|
||||||
buildTime, err := time.ParseInLocation(time.RFC3339, BuildDate, time.UTC)
|
buildTime, err := time.ParseInLocation(time.RFC3339, BuildDate, time.UTC)
|
||||||
|
|||||||
Reference in New Issue
Block a user