Skip to content

Commit

Permalink
publish 🚀 1.2.2版本发布
Browse files Browse the repository at this point in the history
1. admin 角色权限调整默认全部权限
1. 优化内容分类管理
1. 系统登录日志和操作日志代码优化
1. 性能指标、健康检查、default log配置生效
1. 日志全部改为go-admin-core库日志,去除对其他项目的依赖
1. 去除pkg/auth对tools依赖,减少循环引用可能性
1. 增加链路追踪,熟悉的朋友可以将go-admin作为微服务的网关使用😄
1. 代码优化
1. 部分已知bug修复
  • Loading branch information
wenjianzhang authored Nov 3, 2020
2 parents b931925 + 5078403 commit 07cb061
Show file tree
Hide file tree
Showing 80 changed files with 1,885 additions and 2,013 deletions.
134 changes: 0 additions & 134 deletions app/admin/apis/log/loginlog.go

This file was deleted.

113 changes: 0 additions & 113 deletions app/admin/apis/log/operlog.go

This file was deleted.

83 changes: 0 additions & 83 deletions app/admin/apis/syscategory/syscategory.go

This file was deleted.

13 changes: 9 additions & 4 deletions app/admin/apis/system/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,22 @@ func GetMenu(c *gin.Context) {
app.OK(c, result, "")
}

// GetMenuTreeRoleselect 角色修改中的菜单列表
func GetMenuTreeRoleselect(c *gin.Context) {
var Menu models.Menu
var SysRole models.SysRole

id, err := tools.StringToInt(c.Param("roleId"))
SysRole.RoleId = id
result, err := Menu.SetMenuLable()
tools.HasError(err, "抱歉未找到相关信息", -1)
var result *[]models.MenuLable
menuIds := make([]int, 0)
if id != 0 {
menuIds, err = SysRole.GetRoleMeunId()
if tools.GetRoleName(c) != "admin" {
result, err = Menu.SetMenuLable()
tools.HasError(err, "抱歉未找到相关信息", -1)
if id != 0 {
menuIds, err = SysRole.GetRoleMeunId()
tools.HasError(err, "抱歉未找到相关信息", -1)
}
}
app.Custum(c, gin.H{
"code": 200,
Expand Down
8 changes: 4 additions & 4 deletions app/admin/apis/system/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package system

import (
"github.com/gin-gonic/gin"
mycasbin "go-admin/pkg/casbin"

"go-admin/app/admin/models"
"go-admin/common/global"
"go-admin/tools"
"go-admin/tools/app"
)
Expand Down Expand Up @@ -88,7 +88,7 @@ func InsertRole(c *gin.Context) {
tools.HasError(err, "", -1)
}

_, err = mycasbin.LoadPolicy()
_, err = global.LoadPolicy()
tools.HasError(err, "", -1)

app.OK(c, data, "添加成功")
Expand Down Expand Up @@ -118,7 +118,7 @@ func UpdateRole(c *gin.Context) {
tools.HasError(err2, "修改失败(insert)", -1)
}

_, err = mycasbin.LoadPolicy()
_, err = global.LoadPolicy()
tools.HasError(err, "", -1)

app.OK(c, result, "修改成功")
Expand Down Expand Up @@ -156,7 +156,7 @@ func DeleteRole(c *gin.Context) {
_, err := Role.BatchDelete(IDS)
tools.HasError(err, "删除失败", -1)

_, err = mycasbin.LoadPolicy()
_, err = global.LoadPolicy()
tools.HasError(err, "", -1)

app.OK(c, "", "删除成功")
Expand Down
Loading

0 comments on commit 07cb061

Please sign in to comment.