From ea192d9e3fdb717b273f088b755a779d2c1ca66f Mon Sep 17 00:00:00 2001 From: JustSong Date: Mon, 17 Apr 2023 09:26:26 +0800 Subject: [PATCH] fix: allow super admin to change its permissions --- controller/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/user.go b/controller/user.go index 4b38c05..b50b249 100644 --- a/controller/user.go +++ b/controller/user.go @@ -584,7 +584,7 @@ func ManageUser(c *gin.Context) { return } myRole := c.GetInt("role") - if myRole <= user.Role { + if myRole <= user.Role && myRole != common.RoleRootUser { c.JSON(http.StatusOK, gin.H{ "success": false, "message": "无权更新同权限等级或更高权限等级的用户信息",