mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
【优化】租户功能,框架优化
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user