!35 权限提升问题修复

Merge pull request !35 from Aiya/main
This commit is contained in:
Meitner 2024-01-03 06:13:21 +00:00 committed by Gitee
commit fc5924154e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 2 deletions

View File

@ -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());

View File

@ -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(",");