diff --git a/conf/server_name.conf b/conf/server_name.conf index 9a8664f3..16833f0f 100644 --- a/conf/server_name.conf +++ b/conf/server_name.conf @@ -7,6 +7,7 @@ location = /.well-known/matrix/server { location = /.well-known/matrix/client { return 200 '{ "m.homeserver": { "base_url": "https://__DOMAIN__" }, + "org.matrix.msc3575.proxy": { "url": "https://__DOMAIN__"}, "im.vector.riot.jitsi": {"preferredDomain": "__JITSI_SERVER__"}, "im.vector.riot.e2ee": {"default": __E2E_ENABLED_BY_DEFAULT_CLIENT_CONFIG__ } }'; diff --git a/config_panel.toml b/config_panel.toml index f40486a5..7fd9a9f4 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -14,13 +14,14 @@ services = ["__APP__"] no = "false" help = "Defaults to 'false'. If 'true', it is highly recommended to use either captcha, email, or token-based verification to avoid SPAM." - [main.welcome.password_enabled] - ask = "Enable Password Login" - type = "boolean" - yes = "true" - no = "false" - help = "If disabled, Login with Non-YunoHost Users impossible. But it simplies Login process if your Matrix server only has YunoHost SSO Users." - visible = "! enable_registration" + # Disabled for matrix V2 because some client like Element X don't support cas and so require to have password authentication enabled + # [main.welcome.password_enabled] + # ask = "Enable Password Login" + # type = "boolean" + # yes = "true" + # no = "false" + # help = "If disabled, Login with Non-YunoHost Users impossible. But it simplies Login process if your Matrix server only has YunoHost SSO Users." + # visible = "! enable_registration" [main.welcome.registrations_require_3pid] ask = "Registration requires all following 3PID personal identifier" diff --git a/scripts/change_url b/scripts/change_url index f4fc360c..e07ac364 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -26,6 +26,10 @@ configure_nginx #================================================= ynh_script_progression "Updating Synapse config..." + +# Force enable it because some client like Element X don't support CAS and so require to have password authentication enabled +password_enabled=true + ynh_config_add --jinja --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml" ynh_config_add --template="log.yaml" --destination="/etc/matrix-$app/log.yaml" diff --git a/scripts/config b/scripts/config index 77b727f2..bf1eeacb 100644 --- a/scripts/config +++ b/scripts/config @@ -22,6 +22,10 @@ ynh_app_config_validate() { ynh_app_config_apply() { _ynh_app_config_apply configure_nginx + + # Force enable it because some client like Element X don't support CAS and so require to have password authentication enabled + password_enabled=true + ynh_config_add --jinja --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml" ynh_config_add --template="log.yaml" --destination="/etc/matrix-$app/log.yaml" set_permissions diff --git a/scripts/install b/scripts/install index 65b9060d..84216e52 100644 --- a/scripts/install +++ b/scripts/install @@ -154,6 +154,9 @@ configure_nginx #================================================= ynh_script_progression "Configuring Synapse..." +# Force enable it because some client like Element X don't support CAS and so require to have password authentication enabled +password_enabled=true + ynh_config_add --jinja --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml" ynh_config_add --template="log.yaml" --destination="/etc/matrix-$app/log.yaml" diff --git a/scripts/upgrade b/scripts/upgrade index ad587a58..7ded7b16 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -260,12 +260,32 @@ then ynh_app_setting_set --key=form_secret --value="$form_secret" fi +#================================================= +# MIGRATION 13 : REMOVE SLIDING SYNC PROXY COMPONENTS +#================================================= +ynh_script_progression --message="Cleaning sliding sync proxy components..." + +if ynh_''psql_database_exists "${db_name}"_slidingproxy; then + ynh_''psql_drop_db "${db_name}"_slidingproxy +fi + +ynh_safe_rm /etc/matrix-$app/sliding_proxy.conf + +test -e /etc/systemd/system/"$app"-sliding-proxy.service && (yunohost service remove "$app"-sliding-proxy || true) +ynh_config_remove_systemd "$app"-sliding-proxy + +#================================================= +# STANDARD UPGRADE STEPS #================================================= #================================================= # UPDATE SYNAPSE CONFIG #================================================= ynh_script_progression "Updating synapse config..." + +# Force enable it because some client like Element X don't support CAS and so require to have password authentication enabled +password_enabled=true + ynh_config_add --jinja --template="homeserver.yaml" --destination="/etc/matrix-$app/homeserver.yaml" ynh_config_add --template="log.yaml" --destination="/etc/matrix-$app/log.yaml" diff --git a/tests.toml b/tests.toml index ca89ae37..6389a69d 100644 --- a/tests.toml +++ b/tests.toml @@ -5,5 +5,11 @@ test_format = 1.0 [default] test_upgrade_from.3b5a58e5d8b83f292c6160e8908ac662360aa03e.name = "Before packaging v2 (branch old_version_for_CI_6)" + test_upgrade_from.9f273cac72baad192f046620dae33a97cd0ec749.name = "Post app user creation (branch old_version_for_CI_7)" + + test_upgrade_from.0d433dc2d756cf39b13b1be8a7b9c00655edf4fb.name = "Before Matrix v2 implementation" + + test_upgrade_from.70b585b595bfe63ebf4ef82f11acc7e243740764.name = "Before sliding sync proxy removal" + test_upgrade_from.8ab6186bede11c5856886a8978428a0f09b6d08d.name = "Before helper 2.1"