adamsaghy commented on code in PR #4542:
URL: https://github.com/apache/fineract/pull/4542#discussion_r2044643369


##########
fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java:
##########
@@ -195,6 +197,26 @@ public EnumOptionData organisationalRoleData() {
         return organisationalRole;
     }
 
+    public Map<String, Object> changePassword(final JsonCommand command, final 
PlatformPasswordEncoder platformPasswordEncoder) {
+        // unencoded password provided
+        final Map<String, Object> actualChanges = new LinkedHashMap<>(1);
+        updatePassword(command, platformPasswordEncoder, actualChanges);
+        return actualChanges;
+    }
+
+    private void updatePassword(JsonCommand command, PlatformPasswordEncoder 
platformPasswordEncoder, Map<String, Object> actualChanges) {
+        final String passwordParamName = PASSWORD;
+        final String passwordEncodedParamName = "passwordEncoded";
+        if (command.hasParameter(passwordParamName)) {
+            if (command.isChangeInPasswordParameterNamed(passwordParamName, 
this.password, platformPasswordEncoder, getId())) {
+                final String passwordEncodedValue = 
command.passwordValueOfParameterNamed(passwordParamName, 
platformPasswordEncoder,
+                        getId());
+                actualChanges.put(passwordEncodedParamName, 
passwordEncodedValue);

Review Comment:
   We removed it already



##########
fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java:
##########
@@ -151,6 +151,43 @@ private PostUsersResponse() {
         public Long resourceId;
     }
 
+    @Schema(description = "ChangePwdUsersUserIdRequest")
+    public static final class ChangePwdUsersUserIdRequest {
+
+        private ChangePwdUsersUserIdRequest() {
+
+        }
+
+        @Schema(example = "password")
+        public String password;
+        @Schema(example = "repeatPassword")
+        public String repeatPassword;
+    }
+
+    @Schema(description = "ChangePwdUsersUserIdResponse")
+    public static final class ChangePwdUsersUserIdResponse {
+
+        private ChangePwdUsersUserIdResponse() {
+
+        }
+
+        static final class ChangePwdUsersUserIdResponseChanges {
+
+            private ChangePwdUsersUserIdResponseChanges() {
+
+            }
+
+            @Schema(example = 
"abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51")
+            public String passwordEncoded;

Review Comment:
   WE removed it already



-- 
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