去除权限中的租户

This commit is contained in:
XM-GO
2023-05-27 12:48:42 +08:00
parent 2e6cb34922
commit 573f73cc91
6 changed files with 36 additions and 33 deletions

View File

@@ -8,7 +8,6 @@ import (
entity "pandax/apps/system/entity"
services "pandax/apps/system/services"
"pandax/pkg/global"
"strconv"
)
type SystemApiApi struct {
@@ -61,7 +60,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))
ca := casbin.CasbinS{ModelPath: global.Conf.Casbin.ModelPath}
rc.ResData = ca.GetPolicyPathByRoleId(tenantId, roleKey)
rc.ResData = ca.GetPolicyPathByRoleId(roleKey)
}