Просмотр исходного кода

Gate c10y recaptcha config on it being configured.

pull/5330/head
Catalan Lover 1 месяц назад
Родитель
Сommit
154d22092f
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 649BCCF930C07F70
3 измененных файлов: 14 добавлений и 0 удалений
  1. +2
    -0
      roles/custom/matrix-continuwuity/defaults/main.yml
  2. +9
    -0
      roles/custom/matrix-continuwuity/tasks/validate_config.yml
  3. +3
    -0
      roles/custom/matrix-continuwuity/templates/continuwuity.toml.j2

+ 2
- 0
roles/custom/matrix-continuwuity/defaults/main.yml Просмотреть файл

@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2025 MDAD project contributors
# SPDX-FileCopyrightText: 2025 Slavi Pantaleev
# SPDX-FileCopyrightText: 2026 Catalan Lover <catalanlover@protonmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

@@ -191,6 +192,7 @@ matrix_continuwuity_config_turn_password: ''
matrix_continuwuity_self_check_validate_certificates: true

# If set, registration will require Google ReCAPTCHA verification.
matrix_continuwuity_recaptcha_enabled: "{{ matrix_continuwuity_config_recaptcha_site_key != '' and matrix_continuwuity_config_recaptcha_private_site_key != '' }}"
matrix_continuwuity_config_recaptcha_site_key: ''
matrix_continuwuity_config_recaptcha_private_site_key: ''



+ 9
- 0
roles/custom/matrix-continuwuity/tasks/validate_config.yml Просмотреть файл

@@ -1,4 +1,5 @@
# SPDX-FileCopyrightText: 2025 MDAD project contributors
# SPDX-FileCopyrightText: 2026 Catalan Lover <catalanlover@protonmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

@@ -36,3 +37,11 @@
- {'old': 'matrix_continuwuity_docker_image_registry_prefix_upstream', 'new': 'matrix_continuwuity_container_image_registry_prefix_upstream'}
- {'old': 'matrix_continuwuity_docker_image_registry_prefix_upstream_default', 'new': 'matrix_continuwuity_container_image_registry_prefix_upstream_default'}
- {'old': 'matrix_continuwuity_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}

- name: Fail if required Continuwuity variables are undefined
ansible.builtin.fail:
msg: "The `{{ item.name }}` variable must be defined and have a non-null value."
with_items:
- {'name': 'matrix_continuwuity_config_recaptcha_site_key', when: "{{ matrix_continuwuity_config_recaptcha_private_site_key | string | length > 0 }}"}
- {'name': 'matrix_continuwuity_config_recaptcha_private_site_key', when: "{{ matrix_continuwuity_config_recaptcha_site_key | string | length > 0 }}"}
when: "item.when | bool and (lookup('vars', item.name, default='') == '' or lookup('vars', item.name, default='') is none)"

+ 3
- 0
roles/custom/matrix-continuwuity/templates/continuwuity.toml.j2 Просмотреть файл

@@ -2,6 +2,7 @@
SPDX-FileCopyrightText: 2025 MDAD project contributors
SPDX-FileCopyrightText: 2025 Slavi Pantaleev
SPDX-FileCopyrightText: 2025 Suguru Hirahara
SPDX-FileCopyrightText: 2026 Catalan Lover <catalanlover@protonmail.com>

SPDX-License-Identifier: AGPL-3.0-or-later
#}
@@ -490,6 +491,7 @@ registration_token = {{ matrix_continuwuity_config_registration_token | to_json
#
#registration_token_file =

{% if matrix_continuwuity_recaptcha_enabled %}
# The public site key for reCaptcha. If this is provided, reCaptcha
# becomes required during registration. If both captcha *and*
# registration token are enabled, both will be required during
@@ -509,6 +511,7 @@ recaptcha_site_key = {{ matrix_continuwuity_config_recaptcha_site_key | to_json
# even if `recaptcha_site_key` is set.
#
recaptcha_private_site_key = {{ matrix_continuwuity_config_recaptcha_private_site_key | to_json }}
{% endif %}

# Controls whether encrypted rooms and events are allowed.
#


Загрузка…
Отмена
Сохранить