From 4bbd507e7abc7bf7bae1f15d25387bdc5ba55e31 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 22 Apr 2020 11:33:45 +0100 Subject: [PATCH 1/3] If user cannot set email during registration don't tell them to Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/auth/RegistrationForm.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/auth/RegistrationForm.js b/src/components/views/auth/RegistrationForm.js index a89f8c6298..f1624bc9e5 100644 --- a/src/components/views/auth/RegistrationForm.js +++ b/src/components/views/auth/RegistrationForm.js @@ -102,11 +102,15 @@ export default createReactClass({ "No identity server is configured so you cannot add an email address in order to " + "reset your password in the future.", ); - } else { + } else if (this._showEmail()) { desc = _t( "If you don't specify an email address, you won't be able to reset your password. " + "Are you sure?", ); + } else { + // user can't set an e-mail so don't prompt them to + self._doSubmit(ev); + return; } const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); From 162531f1c59109955bbaaa196d8f5198f502ff99 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 22 Apr 2020 13:36:14 +0100 Subject: [PATCH 2/3] try to enable e2e test synapse registration 3pid support Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../synapse/config-templates/consent/homeserver.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml b/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml index e07cf585d8..f9e62c94a6 100644 --- a/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml +++ b/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml @@ -642,7 +642,8 @@ enable_registration: true # Explicitly disable asking for MSISDNs from the registration # flow (overrides registrations_require_3pid if MSISDNs are set as required) # -#disable_msisdn_registration: true +disable_msisdn_registration: false +threepid_behaviour_email: "local" # Mandate that users are only allowed to associate certain formats of # 3PIDs with accounts on this server. From 59cc7f0867fa9ff1d7c4603c8199e7c827070faf Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 22 Apr 2020 13:50:40 +0100 Subject: [PATCH 3/3] here's hoping Synapse doesn't actually try to send an email :D Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../config-templates/consent/homeserver.yaml | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml b/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml index f9e62c94a6..536c017b9e 100644 --- a/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml +++ b/test/end-to-end-tests/synapse/config-templates/consent/homeserver.yaml @@ -643,7 +643,6 @@ enable_registration: true # flow (overrides registrations_require_3pid if MSISDNs are set as required) # disable_msisdn_registration: false -threepid_behaviour_email: "local" # Mandate that users are only allowed to associate certain formats of # 3PIDs with accounts on this server. @@ -883,22 +882,22 @@ password_config: # If your SMTP server requires authentication, the optional smtp_user & # smtp_pass variables should be used # -#email: -# enable_notifs: false -# smtp_host: "localhost" -# smtp_port: 25 -# smtp_user: "exampleusername" -# smtp_pass: "examplepassword" -# require_transport_security: False -# notif_from: "Your Friendly %(app)s Home Server " -# app_name: Matrix -# # if template_dir is unset, uses the example templates that are part of -# # the Synapse distribution. -# #template_dir: res/templates -# notif_template_html: notif_mail.html -# notif_template_text: notif_mail.txt -# notif_for_new_users: True -# riot_base_url: "http://localhost/riot" +email: + enable_notifs: false + smtp_host: "localhost" + smtp_port: 25 + smtp_user: "exampleusername" + smtp_pass: "examplepassword" + require_transport_security: False + notif_from: "Your Friendly %(app)s Home Server " + app_name: Matrix + # if template_dir is unset, uses the example templates that are part of + # the Synapse distribution. + #template_dir: res/templates + notif_template_html: notif_mail.html + notif_template_text: notif_mail.txt + notif_for_new_users: True + riot_base_url: "http://localhost/riot" #password_providers: