[优化] 更新kit包

This commit is contained in:
PandaGoAdmin
2022-08-19 21:54:57 +08:00
parent cf97d854d8
commit 915bc15bae
14 changed files with 162 additions and 22 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/XM-GO/PandaKit/utils"
entity "pandax/apps/system/entity"
services "pandax/apps/system/services"
"pandax/pkg/global"
"strconv"
)
@@ -61,5 +62,6 @@ func (s *SystemApiApi) GetAllApis(rc *restfulx.ReqCtx) {
func (s *SystemApiApi) GetPolicyPathByRoleId(rc *restfulx.ReqCtx) {
roleKey := rc.Request.QueryParameter("roleKey")
tenantId := strconv.Itoa(int(rc.LoginAccount.TenantId))
rc.ResData = casbin.GetPolicyPathByRoleId(tenantId, roleKey)
ca := casbin.CasbinS{ModelPath: global.Conf.Casbin.ModelPath}
rc.ResData = ca.GetPolicyPathByRoleId(tenantId, roleKey)
}