|
@@ -41,7 +41,7 @@ func PermissionList(c *gin.Context) {
|
|
}
|
|
}
|
|
parents := make([]*chart_permission.SimpleChartPermission, 0)
|
|
parents := make([]*chart_permission.SimpleChartPermission, 0)
|
|
parentPermissions := make(map[int][]*chart_permission.SimpleChartPermission, 0)
|
|
parentPermissions := make(map[int][]*chart_permission.SimpleChartPermission, 0)
|
|
- showPermissionIds := make(map[int]struct{}, 0)
|
|
|
|
|
|
+ showPermissionIds := make(map[int]struct{})
|
|
for _, v := range permissions {
|
|
for _, v := range permissions {
|
|
if v.ParentId > 0 && utils.InArrayByInt(validPermissionIds, int(v.ChartPermissionID)) && utils.InArrayByInt(matterPermissionIds, int(v.ChartPermissionID)) {
|
|
if v.ParentId > 0 && utils.InArrayByInt(validPermissionIds, int(v.ChartPermissionID)) && utils.InArrayByInt(matterPermissionIds, int(v.ChartPermissionID)) {
|
|
if parentPermissions[v.ParentId] == nil {
|
|
if parentPermissions[v.ParentId] == nil {
|