【优化】租户功能,框架优化

This commit is contained in:
PandaGoAdmin
2022-07-18 18:17:11 +08:00
parent d33bd39570
commit ae38e7bcef
60 changed files with 861 additions and 647 deletions

View File

@@ -8,6 +8,7 @@ import (
"pandax/base/ctx"
"pandax/base/ginx"
"pandax/base/utils"
"strconv"
)
type SystemApiApi struct {
@@ -120,5 +121,6 @@ func (s *SystemApiApi) GetAllApis(rc *ctx.ReqCtx) {
// @Router /casbin/getPolicyPathByRoleId [get]
func (s *SystemApiApi) GetPolicyPathByRoleId(rc *ctx.ReqCtx) {
roleKey := rc.GinCtx.Query("roleKey")
rc.ResData = casbin.GetPolicyPathByRoleId(roleKey)
tenantId := strconv.Itoa(int(rc.LoginAccount.TenantId))
rc.ResData = casbin.GetPolicyPathByRoleId(tenantId, roleKey)
}