From f60ed652b63da52c14e248c578a0b383a62524fc Mon Sep 17 00:00:00 2001 From: lyon Date: Wed, 3 Jan 2024 10:33:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=9D=83=E9=99=90=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=9D=83=E9=99=90=E6=8F=90=E5=8D=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maxkey/web/contorller/ChangePasswodController.java | 4 +++- .../org/dromara/maxkey/web/contorller/ProfileController.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ChangePasswodController.java b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ChangePasswodController.java index e3360fa02..62ad4aa24 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ChangePasswodController.java +++ b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ChangePasswodController.java @@ -69,7 +69,9 @@ public class ChangePasswodController { public ResponseEntity changePasswod( @RequestBody ChangePassword changePassword, @CurrentUser UserInfo currentUser) { - + if(!currentUser.getId().equals(changePassword.getId())){ + return null; + } changePassword.setUserId(currentUser.getId()); changePassword.setUsername(currentUser.getUsername()); changePassword.setInstId(currentUser.getInstId()); diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ProfileController.java b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ProfileController.java index 6f41cae89..8cb606635 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ProfileController.java +++ b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/web/contorller/ProfileController.java @@ -66,7 +66,9 @@ public class ProfileController { @CurrentUser UserInfo currentUser, BindingResult result) { logger.debug(userInfo.toString()); - + if(!currentUser.getId().equals(userInfo.getId())){ + return null; + } // if(userInfo.getExtraAttributeValue()!=null){ // String []extraAttributeLabel=userInfo.getExtraAttributeName().split(","); // String []extraAttributeValue=userInfo.getExtraAttributeValue().split(",");