修改权限认证状态1

This commit is contained in:
2024-10-18 10:16:21 +08:00
parent 79de15f061
commit dcb2d6a988
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -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