fix: revert a00d8e2
This commit is contained in:
parent
11fa5042df
commit
3d86279240
@ -663,14 +663,6 @@ func UpdateSelf(c *gin.Context) {
|
|||||||
// 检查是否是sidebar_modules更新请求
|
// 检查是否是sidebar_modules更新请求
|
||||||
if sidebarModules, exists := requestData["sidebar_modules"]; exists {
|
if sidebarModules, exists := requestData["sidebar_modules"]; exists {
|
||||||
userId := c.GetInt("id")
|
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)
|
user, err := model.GetUserById(userId, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.ApiError(c, err)
|
common.ApiError(c, err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user