-
Notifications
You must be signed in to change notification settings - Fork 357
feat(user-management) : Added Current password verification for user modification. #2050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Thank you @GovindSinghh for the work thou basing on the issue, I imagined the current password input area would be to confirm the correct password before allowing accessing to modify a user. |
That would also work, but according to the issue, the user can go to modify page, the enter the user password which then is compared with the actual user password. |
@GovindSinghh , the video format is not supported, you could share another format for clarity |
hello @GovindSinghh , try running this |
Hello @mozzy11, kindly review this if possible |
Thanks @GovindSinghh . |
I have already attached in the PR ! plz check if it's visible to u or not |
} else if (userDataShow.currentPassword !== userDataShow.userPassword) { | ||
setIsCurrentPassCorrect(false); | ||
} else { | ||
setIsCurrentPassCorrect(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you cant correctly check a current user password from the forntend since its harshed.
You can only check it from the backend side ie here
@@ -875,6 +933,7 @@ function UserAddModify() { | |||
id: "login.login.password", | |||
})} | |||
required={true} | |||
disabled={ID === "0" ? false : !isCurrentPassCorrect} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from just disabling the UI componenet , there shoulb be a validation on the backend side to ensure current passowrd matched the user Passowrd
@mozzy11 I've tried to implement better code logic as u suggusted , kindly review this |
Thanks @GovindSinghh . |
@mozzy11 is this looking fine |
Thanks @GovindSinghh . |
hey @mozzy11 , is this ready to get merged..! |
Thanks @GovindSinghh . Looking at it |
Pull Requests Requirements
Issue number if applicable.
documentation.
Summary
Screenshots
screenRecoding_user_management2.mp4
[Add relevant screenshots here if applicable]
Related Issue
closes #2039
[Add a link to the related issue or mention it here if applicable]
Other
[Add any additional information or notes here]