DeathGun44 commented on PR #5387:
URL: https://github.com/apache/fineract/pull/5387#issuecomment-3839105071

   @adamsaghy Hi Adam, thanks for the feedback. I've reworked the 
implementation to strictly enforce self-service as requested:
   
   Dedicated Endpoint: The exemption now targets POST /users/{id}/pwd 
(ChangePassword) instead of the general updateUser. This limits changes to 
password fields only.
   
   Identity Check: I added a check to ensure entityId == currentUser.getId(). 
The exemption now only applies if the user is changing their own password.
   
   Verified Flow:
   
   POST /users/{ownId}/pwd → Allowed (Self-check passes, account unlocked).
   
   POST /users/{otherId}/pwd → Blocked (Self-check fails).
   
   PUT /users/{ownId} (General update) → Blocked (Wrong endpoint).
   
   Note: Admins can still reset passwords via the standard flow, which 
re-triggers the passwordResetRequired flag for the target user.


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