feat: 合并Gin_Vue
This commit is contained in:
@@ -9,13 +9,13 @@ import (
|
||||
sysRoleService "ems.agt/features/sys_role/service"
|
||||
sysUserModel "ems.agt/features/sys_user/model"
|
||||
"ems.agt/features/sys_user/service"
|
||||
"ems.agt/lib/core/conf"
|
||||
"ems.agt/lib/core/utils/ctx"
|
||||
"ems.agt/lib/core/utils/parse"
|
||||
"ems.agt/lib/core/vo/result"
|
||||
"ems.agt/lib/midware"
|
||||
"ems.agt/lib/services"
|
||||
"ems.agt/restagent/config"
|
||||
srcConfig "ems.agt/src/framework/config"
|
||||
)
|
||||
|
||||
// 用户接口添加到路由
|
||||
@@ -114,7 +114,7 @@ func (s *SysUserApi) Info(w http.ResponseWriter, r *http.Request) {
|
||||
roles := s.sysRoleService.SelectRoleList(sysRoleModel.SysRole{})
|
||||
|
||||
// 不是系统指定管理员需要排除其角色
|
||||
if !conf.IsAdmin(userId) {
|
||||
if !srcConfig.IsAdmin(userId) {
|
||||
rolesFilter := make([]sysRoleModel.SysRole, 0)
|
||||
for _, r := range roles {
|
||||
if r.RoleID != "1" {
|
||||
@@ -193,7 +193,7 @@ func (s *SysUserApi) Edit(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 检查是否管理员用户
|
||||
// if conf.IsAdmin(body.Id) {
|
||||
// if srcConfig.IsAdmin(body.Id) {
|
||||
// ctx.JSON(w, 200, result.ErrMsg("不允许操作管理员用户"))
|
||||
// return
|
||||
// }
|
||||
@@ -261,7 +261,7 @@ func (s *SysUserApi) ResetPwd(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 检查是否管理员用户
|
||||
if conf.IsAdmin(body.UserID) {
|
||||
if srcConfig.IsAdmin(body.UserID) {
|
||||
ctx.JSON(w, 200, result.ErrMsg("No permission to access user data!"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
sysRoleModel "ems.agt/features/sys_role/model"
|
||||
sysUserModel "ems.agt/features/sys_user/model"
|
||||
"ems.agt/lib/core/datasource"
|
||||
"ems.agt/lib/core/utils/crypto"
|
||||
"ems.agt/lib/core/utils/date"
|
||||
"ems.agt/lib/core/utils/parse"
|
||||
"ems.agt/lib/log"
|
||||
"ems.agt/src/framework/utils/crypto"
|
||||
)
|
||||
|
||||
// 实例化数据层 RepoSysUser 结构体
|
||||
|
||||
Reference in New Issue
Block a user