From 6bc2391fb2669c7abc9a33804690e5cf05267d39 Mon Sep 17 00:00:00 2001 From: Andrea Giovine Date: Fri, 11 Feb 2022 16:44:55 +0100 Subject: [PATCH] change variable for enable user registration --- CHANGELOG.md | 2 +- docs/configuring-captcha.md | 2 +- docs/configuring-playbook-ma1sd.md | 4 ++-- docs/registering-users.md | 2 +- group_vars/matrix_servers | 2 +- roles/matrix-awx/surveys/configure_synapse.json.j2 | 4 ++-- roles/matrix-awx/tasks/set_variables_synapse.yml | 2 +- roles/matrix-dendrite/defaults/main.yml | 2 +- roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 | 2 +- roles/matrix-synapse/defaults/main.yml | 4 ++-- roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 | 4 ++-- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c2077a70..a412964cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1644,7 +1644,7 @@ Additional details are available in [Setting up the LDAP authentication password ## Support for controlling public registration and room auto-join -The playbook now lets you enable public registration for users (controlled via `matrix_synapse_enable_registration`). +The playbook now lets you enable public registration for users (controlled via `matrix_homeserver_enable_registration`). By default, public registration is forbidden. You can also make people automatically get auto-joined to rooms (controlled via `matrix_synapse_auto_join_rooms`). diff --git a/docs/configuring-captcha.md b/docs/configuring-captcha.md index d137cf99e..3b03d3b15 100644 --- a/docs/configuring-captcha.md +++ b/docs/configuring-captcha.md @@ -17,7 +17,7 @@ Must be a reCAPTCHA **v2** key using the "I'm not a robot" Checkbox option Once registered as above, set the following values: ```yaml -matrix_synapse_enable_registration_captcha: true +matrix_homeserver_enable_registration_captcha: true matrix_synapse_recaptcha_public_key: 'YOUR_SITE_KEY' matrix_synapse_recaptcha_private_key: 'YOUR_SECRET_KEY' ``` diff --git a/docs/configuring-playbook-ma1sd.md b/docs/configuring-playbook-ma1sd.md index 70c507cba..7b1e9ffec 100644 --- a/docs/configuring-playbook-ma1sd.md +++ b/docs/configuring-playbook-ma1sd.md @@ -42,9 +42,9 @@ If you'd like to change the default email templates used by ma1sd, take a look a To use the [Registration](https://github.com/ma1uta/ma1sd/blob/master/docs/features/registration.md) feature of ma1sd, you can make use of the following variables: -- `matrix_synapse_enable_registration` - to enable user-initiated registration in Synapse +- `matrix_homeserver_enable_registration` - to enable user-initiated registration in Synapse -- `matrix_synapse_enable_registration_captcha` - to validate registering users using reCAPTCHA, as described in the [enabling reCAPTCHA](configuring_captcha.md) documentation. +- `matrix_homeserver_enable_registration_captcha` - to validate registering users using reCAPTCHA, as described in the [enabling reCAPTCHA](configuring_captcha.md) documentation. - `matrix_synapse_registrations_require_3pid` - to control the types of 3pid (`'email'`, `'msisdn'`) required by the Synapse server for registering diff --git a/docs/registering-users.md b/docs/registering-users.md index 90c065bfe..43009ce82 100644 --- a/docs/registering-users.md +++ b/docs/registering-users.md @@ -50,7 +50,7 @@ If you'd rather **keep your server private** (public registration closed, as is To **open up user registration publicly** (usually **not recommended**), consider using the following configuration: ```yaml -matrix_synapse_enable_registration: true +matrix_homeserver_enable_registration: true ``` and running the [installation](installing.md) procedure once again. diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 596fba130..4aaff5af0 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -1866,7 +1866,7 @@ matrix_client_element_integrations_jitsi_widget_url: "{{ matrix_dimension_integr matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}" -matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}" +matrix_client_element_registration_enabled: "{{ matrix_homeserver_enable_registration }}" matrix_client_element_enable_presence_by_hs_url: | {{ diff --git a/roles/matrix-awx/surveys/configure_synapse.json.j2 b/roles/matrix-awx/surveys/configure_synapse.json.j2 index 7a4e711d1..762bbf5fd 100755 --- a/roles/matrix-awx/surveys/configure_synapse.json.j2 +++ b/roles/matrix-awx/surveys/configure_synapse.json.j2 @@ -8,10 +8,10 @@ "required": false, "min": null, "max": null, - "default": "{{ matrix_synapse_enable_registration | string | lower }}", + "default": "{{ matrix_homeserver_enable_registration | string | lower }}", "choices": "true\nfalse", "new_question": true, - "variable": "matrix_synapse_enable_registration", + "variable": "matrix_homeserver_enable_registration", "type": "multiplechoice" }, { diff --git a/roles/matrix-awx/tasks/set_variables_synapse.yml b/roles/matrix-awx/tasks/set_variables_synapse.yml index f749f03f6..2c626bd0b 100755 --- a/roles/matrix-awx/tasks/set_variables_synapse.yml +++ b/roles/matrix-awx/tasks/set_variables_synapse.yml @@ -19,7 +19,7 @@ insertafter: '# Synapse Settings Start' with_dict: 'matrix_synapse_allow_public_rooms_over_federation': '{{ matrix_synapse_allow_public_rooms_over_federation }}' - 'matrix_synapse_enable_registration': '{{ matrix_synapse_enable_registration }}' + 'matrix_homeserver_enable_registration': '{{ matrix_homeserver_enable_registration }}' 'matrix_synapse_federation_enabled': '{{ matrix_synapse_federation_enabled }}' 'matrix_synapse_enable_group_creation': '{{ matrix_synapse_enable_group_creation }}' 'matrix_synapse_presence_enabled': '{{ matrix_synapse_presence_enabled }}' diff --git a/roles/matrix-dendrite/defaults/main.yml b/roles/matrix-dendrite/defaults/main.yml index ec3937c76..3efbdb95a 100644 --- a/roles/matrix-dendrite/defaults/main.yml +++ b/roles/matrix-dendrite/defaults/main.yml @@ -82,7 +82,7 @@ matrix_dendrite_rate_limiting_threshold: 5 matrix_dendrite_rate_limiting_cooloff_ms: 500 # Controls whether people with access to the homeserver can register by themselves. -matrix_dendrite_registration_disabled: false +matrix_homeserver_enable_registration: false # reCAPTCHA API for validating registration attempts matrix_dendrite_enable_registration_captcha: false diff --git a/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 b/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 index 102dd2f59..9d7b22062 100644 --- a/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 +++ b/roles/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 @@ -144,7 +144,7 @@ client_api: # Prevents new users from being able to register on this homeserver, except when # using the registration shared secret below. - registration_disabled: {{ matrix_dendrite_registration_disabled|to_json }} + registration_disabled: {{ matrix_homeserver_enable_registration|to_json }} # If set, allows registration by anyone who knows the shared secret, regardless of # whether registration is otherwise disabled. diff --git a/roles/matrix-synapse/defaults/main.yml b/roles/matrix-synapse/defaults/main.yml index 079ffb4b6..92cbc8564 100644 --- a/roles/matrix-synapse/defaults/main.yml +++ b/roles/matrix-synapse/defaults/main.yml @@ -201,10 +201,10 @@ matrix_synapse_limit_profile_requests_to_users_who_share_rooms: false matrix_synapse_include_profile_data_on_invite: true # Controls whether people with access to the homeserver can register by themselves. -matrix_synapse_enable_registration: false +matrix_homeserver_enable_registration: false # reCAPTCHA API for validating registration attempts -matrix_synapse_enable_registration_captcha: false +matrix_homeserver_enable_registration_captcha: false matrix_synapse_recaptcha_public_key: '' matrix_synapse_recaptcha_private_key: '' diff --git a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 index af6e3e130..544775860 100644 --- a/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 +++ b/roles/matrix-synapse/templates/synapse/homeserver.yaml.j2 @@ -1176,7 +1176,7 @@ recaptcha_private_key: {{ matrix_synapse_recaptcha_private_key|to_json }} # unless a captcha is answered. Requires a valid ReCaptcha # public/private key. Defaults to 'false'. # -enable_registration_captcha: {{ matrix_synapse_enable_registration_captcha|to_json }} +enable_registration_captcha: {{ matrix_homeserver_enable_registration_captcha|to_json }} # The API endpoint to use for verifying m.login.recaptcha responses. # Defaults to "https://www.recaptcha.net/recaptcha/api/siteverify". @@ -1220,7 +1220,7 @@ turn_allow_guests: {{ matrix_synapse_turn_allow_guests|to_json }} # Enable registration for new users. # -enable_registration: {{ matrix_synapse_enable_registration|to_json }} +enable_registration: {{ matrix_homeserver_enable_registration|to_json }} # Time that a user's session remains valid for, after they log in. #