From 9fa5e01f2f8789ec2d8571ea3eb5d6fb2c5eb28c Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 7 Aug 2019 13:30:52 +0100 Subject: [PATCH] Disable password reset if no ID server --- src/components/structures/auth/ForgotPassword.js | 16 ++++++++++++++++ src/i18n/strings/en_EN.json | 5 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index a5ffc9f008..0c1a8ec33d 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -256,6 +256,22 @@ module.exports = React.createClass({ ; } + if (!this.props.serverConfig.isUrl) { + return
+

+ {yourMatrixAccountText} + {editLink} +

+ {_t( + "No identity server is configured: " + + "add one in server settings to reset your password.", + )} + + {_t('Sign in instead')} + +
; + } + return
{errorText} {serverDeadSection} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b2f42afe9e..a712ac18c7 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -556,10 +556,10 @@ "Success": "Success", "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them": "Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them", "Profile": "Profile", - "Account": "Account", - "Set a new account password...": "Set a new account password...", "Email addresses": "Email addresses", "Phone numbers": "Phone numbers", + "Account": "Account", + "Set a new account password...": "Set a new account password...", "Language and region": "Language and region", "Theme": "Theme", "Light theme": "Light theme", @@ -1565,6 +1565,7 @@ "Your password has been reset.": "Your password has been reset.", "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device.": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device.", "Return to login screen": "Return to login screen", + "No identity server is configured: add one in server settings to reset your password.": "No identity server is configured: add one in server settings to reset your password.", "Set a new password": "Set a new password", "Invalid homeserver discovery response": "Invalid homeserver discovery response", "Failed to get autodiscovery configuration from server": "Failed to get autodiscovery configuration from server",