提交kit/casbin

Signed-off-by: lixxxww <941403820@qq.com>
This commit is contained in:
lixxxww
2024-01-23 11:29:20 +00:00
committed by Gitee
parent ffb05847e0
commit e51f21edee
6 changed files with 124 additions and 25 deletions

View File

@@ -1,12 +1,12 @@
package api
import (
"github.com/PandaXGO/PandaKit/casbin"
"github.com/PandaXGO/PandaKit/model"
"github.com/PandaXGO/PandaKit/restfulx"
"github.com/PandaXGO/PandaKit/utils"
entity "pandax/apps/system/entity"
services "pandax/apps/system/services"
"pandax/kit/casbin"
"pandax/kit/model"
"pandax/kit/restfulx"
"pandax/kit/utils"
"pandax/pkg/global"
)
@@ -60,6 +60,6 @@ func (s *SystemApiApi) GetAllApis(rc *restfulx.ReqCtx) {
func (s *SystemApiApi) GetPolicyPathByRoleId(rc *restfulx.ReqCtx) {
roleKey := rc.Request.QueryParameter("roleKey")
ca := casbin.CasbinS{ModelPath: global.Conf.Casbin.ModelPath}
ca := casbin.CasbinService{ModelPath: global.Conf.Casbin.ModelPath}
rc.ResData = ca.GetPolicyPathByRoleId(roleKey)
}