summaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx')
-rw-r--r--packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx
index 3c00ad1b8..eef2a0692 100644
--- a/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx
+++ b/packages/demobank-ui/src/pages/account/UpdateAccountPassword.tsx
@@ -61,16 +61,18 @@ export function UpdateAccountPassword({
type: "error",
title: i18n.str`Not authorized to change the password, maybe the session is invalid.`
})
- case "old-password-invalid-or-not-allowed": return notify({
- type: "error",
- title: current ?
- i18n.str`This user have no right on to change the password.` :
- i18n.str`This user have no right on to change the password or the old password doesn't match.`
- })
case "not-found": return notify({
type: "error",
title: i18n.str`Account not found`
})
+ case "user-require-old-password": return notify({
+ type: "error",
+ title: i18n.str`Old password need to be provided in order to change new one. If you don't have it contact your account administrator.`
+ })
+ case "wrong-old-password": return notify({
+ type: "error",
+ title: i18n.str`Your current password doesn't match, can't change to a new password.`
+ })
default: assertUnreachable(resp)
}
}