You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/01/04 10:06:20 UTC

[GitHub] [incubator-shenyu] yu199195 commented on a change in pull request #2703: [type: refactor] optimize user edit logic.

yu199195 commented on a change in pull request #2703:
URL: https://github.com/apache/incubator-shenyu/pull/2703#discussion_r777960414



##########
File path: shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/DashboardUserController.java
##########
@@ -137,6 +139,28 @@ public ShenyuAdminResult updateDashboardUser(@PathVariable("id") final String id
         return ShenyuAdminResult.success(ShenyuResultMessage.UPDATE_SUCCESS, updateCount);
     }
 
+    /**
+     * modify dashboard user password.
+     *
+     * @param id               primary key.
+     * @return {@linkplain ShenyuAdminResult}
+     */
+    @RequiresPermissions("system:manager:edit")
+    @PutMapping("/modify-password/{id}")
+    public ShenyuAdminResult updateDashboardUserPassword(@PathVariable("id") final String id) {
+        String key = secretProperties.getKey();
+        String iv = secretProperties.getIv();
+        final DashboardUserEditVO userEditVO = dashboardUserService.findById(id);
+        Integer updateCount = 0;
+        if (Objects.nonNull(userEditVO)) {
+            DashboardUserDTO dashboardUserDTO = new DashboardUserDTO();
+            BeanUtils.copyProperties(userEditVO, dashboardUserDTO);

Review comment:
       not used this beanutils




-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org