|
@@ -397,6 +397,14 @@ func (this *SysRoleController) SysRoleMenuAuthSave() {
|
|
|
br.Msg = "请选择菜单"
|
|
|
return
|
|
|
}
|
|
|
+ sysRole, err := models.GetSysRoleById(req.SysRoleId)
|
|
|
+ if err == nil {
|
|
|
+ if sysRole.SysRoleName == "admin" {
|
|
|
+ br.Msg = "不允许修改admin权限"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
halfMap := make(map[int]struct{})
|
|
|
for _, v := range req.HalfMenuIds {
|
|
|
halfMap[v] = struct{}{}
|
|
@@ -465,16 +473,6 @@ func (this *SysRoleController) SysRoleMenuAuthList() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- sysRole, err := models.GetSysRoleById(roleId)
|
|
|
- if err == nil {
|
|
|
- if sysRole.SysRoleName == "admin" {
|
|
|
- br.Ret = 200
|
|
|
- br.Success = true
|
|
|
- br.Msg = "获取成功"
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
order := `sort ASC, create_time DESC, sys_menu_id DESC`
|
|
|
list, e := models.GetSysMenuItemsByCondition(``, make([]interface{}, 0), []string{}, order)
|
|
|
if e != nil {
|