@ -1,4 +1,4 @@
p, admin, /mysql, GET
p, admin, /mysql, POST
p, admin, /kefuinfo,POST
p, admin, /kefuinfo,DELETE
p, role_1, /mysql, GET
p, role_1, /mysql, POST
p, role_1, /kefuinfo,POST
p, role_1, /kefuinfo,DELETE
@ -7,7 +7,8 @@ import (
"log"
)
func CasbinACL(c *gin.Context){
sub, _ :=c.Get("user")
roleId, _ :=c.Get("role_id")
sub:=fmt.Sprintf("%s_%d","role",int(roleId.(float64)))
obj:=c.Request.RequestURI
act:=c.Request.Method
e, err := casbin.NewEnforcer("config/model.conf", "config/policy.csv")