修改权限认证状态1
This commit is contained in:
@@ -239,6 +239,11 @@ func (r *AdminUser) PutAdminUser(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if loginUserId == userId && (req.Status == 1 || req.Status == 2 || req.Status == 3) {
|
||||
responses.FailWithMessage("不可修改自己用户状态", c)
|
||||
return
|
||||
}
|
||||
|
||||
if loginUserId != userId && loginAdminUser.IsAdmin != 1 {
|
||||
responses.FailWithMessage("非管理员用户只可修改自己数据", c)
|
||||
return
|
||||
@@ -285,6 +290,7 @@ func (r *AdminUser) PutAdminUser(c *gin.Context) {
|
||||
|
||||
data := make(map[string]interface{})
|
||||
data["access"] = req.Access
|
||||
data["status"] = req.Status
|
||||
data["is_deleted"] = req.IsDeleted
|
||||
data["is_disabled"] = req.IsDisabled
|
||||
data["nick_name"] = req.NickName
|
||||
|
||||
Reference in New Issue
Block a user