From c6f53e4cc8f72d78da4417e597dd82bbe5fb1afe Mon Sep 17 00:00:00 2001 From: creamlike1024 Date: Sun, 31 Aug 2025 14:59:55 +0800 Subject: [PATCH] fix: revert 3a3be21 --- controller/user.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/controller/user.go b/controller/user.go index 3110bf1b0..0b9fccf2a 100644 --- a/controller/user.go +++ b/controller/user.go @@ -663,14 +663,6 @@ func UpdateSelf(c *gin.Context) { // 检查是否是sidebar_modules更新请求 if sidebarModules, exists := requestData["sidebar_modules"]; exists { userId := c.GetInt("id") - userRole := c.GetInt("role") - if userRole != common.RoleRootUser && userRole != common.RoleAdminUser { - c.JSON(http.StatusOK, gin.H{ - "success": false, - "message": "无权更新设置", - }) - return - } user, err := model.GetUserById(userId, false) if err != nil { common.ApiError(c, err)