perf: avoid eager formatting in debug log calls (#4929)
This commit is contained in:
+1
-1
@@ -520,7 +520,7 @@ func AdminDisable2FA(c *gin.Context) {
|
||||
}
|
||||
|
||||
myRole := c.GetInt("role")
|
||||
if myRole <= targetUser.Role && myRole != common.RoleRootUser {
|
||||
if !canManageTargetRole(myRole, targetUser.Role) {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"success": false,
|
||||
"message": "无权操作同级或更高级用户的2FA设置",
|
||||
|
||||
Reference in New Issue
Block a user