Преглед на файлове

修复外协人员密码加密错误bug

lr преди 2 години
родител
ревизия
e0d0c8a6cd
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java

+ 2 - 2
eladmin-system/src/main/java/me/zhengjie/modules/system/rest/UserController.java

@@ -112,8 +112,8 @@ public class UserController {
     @PreAuthorize("@el.check('user:add')")
     public ResponseEntity<Object> create(@Validated @RequestBody User resources) throws Exception {
         checkLevel(resources);
-        resources.setPassword(RsaUtils.encryptByPublicKey(RsaProperties.publicKey, resources.getOrgPassword()));
-//        passwordEncoder.encode(resources.getOrgPassword());
+        //resources.setPassword(RsaUtils.encryptByPublicKey(RsaProperties.publicKey, resources.getOrgPassword()));
+        resources.setPassword(passwordEncoder.encode(resources.getOrgPassword()));
         userService.create(resources);
         return new ResponseEntity<>(HttpStatus.CREATED);
     }