增加角色复制后台功能 修复swagger不能带token的问题

This commit is contained in:
pixel
2020-04-20 16:21:50 +08:00
parent eea245e405
commit 0be0ec9a2f
11 changed files with 456 additions and 11 deletions

View File

@@ -71,13 +71,13 @@ func UpdateCasbinApi(oldPath string, newPath string, oldMethod string, newMethod
// @param authorityId string
// @return []string
func GetPolicyPathByAuthorityId(authorityId string) (pathMaps []map[string]string) {
func GetPolicyPathByAuthorityId(authorityId string) (pathMaps []request.CasbinInfo) {
e := Casbin()
list := e.GetFilteredPolicy(0, authorityId)
for _, v := range list {
pathMaps = append(pathMaps, map[string]string{
"path": v[1],
"method": v[2],
pathMaps = append(pathMaps, request.CasbinInfo{
Path: v[1],
Method: v[2],
})
}
return pathMaps