Skip to content

Commit

Permalink
disabled password change for test users
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr1414 committed Feb 21, 2025
1 parent 5910c19 commit 53fd512
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions src/components/info/UserProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,29 +134,31 @@ export default function UserProfile() {
value={email}
placeholder={"Enter your email address"}
/>
<div className="info__link">
<Password />
<p
className="info__password"
onClick={() => {
const currentPassword = window.prompt(
"Enter your current password:"
);
if (!currentPassword) {
return;
}
{isCurrentUserCantLeave ? null : (
<div className="info__link">
<Password />
<p
className="info__password"
onClick={() => {
const currentPassword = window.prompt(
"Enter your current password:"
);
if (!currentPassword) {
return;
}

const newPassword = window.prompt("Enter a new password:");
if (!newPassword || !currentPassword) {
return;
}
const newPassword = window.prompt("Enter a new password:");
if (!newPassword || !currentPassword) {
return;
}

usersService.changePassword(currentPassword, newPassword);
}}
>
Change password...
</p>
</div>
usersService.changePassword(currentPassword, newPassword);
}}
>
Change password...
</p>
</div>
)}
{isMobileView ? (
<div className="info__link">
<LogoutMini />
Expand Down

0 comments on commit 53fd512

Please sign in to comment.