fix: allow super admin to change its permissions

This commit is contained in:
JustSong
2023-04-17 09:26:26 +08:00
parent 3fe6625e16
commit ea192d9e3f
+1 -1
View File
@@ -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": "无权更新同权限等级或更高权限等级的用户信息",