dragon-zhang commented on code in PR #3658:
URL: https://github.com/apache/shenyu/pull/3658#discussion_r930927148


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/DashboardUserController.java:
##########
@@ -158,6 +161,11 @@ public ShenyuAdminResult modifyPassword(@PathVariable("id")
                                             @Existed(provider = 
DashboardUserMapper.class,
                                                     message = "user is not 
found") final String id,
                                             @Valid @RequestBody final 
DashboardUserDTO dashboardUserDTO) {
+        UserInfo userInfo = (UserInfo) 
SecurityUtils.getSubject().getPrincipal();
+        if (Objects.isNull(userInfo) || !userInfo.getUserId().equals(id)

Review Comment:
   `Objects.isNull(userInfo)` maybe need to return another error message.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to