From 9a779aafa3a2ae1d2f92058b8eda2202db96e00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Tue, 8 Feb 2022 13:45:03 +0100 Subject: [PATCH] __matrix_synapse: add --disable-{displayname,3pid}-changes flag --- type/__matrix_synapse/files/homeserver.yaml.sh | 4 ++-- type/__matrix_synapse/man.rst | 6 ++++++ type/__matrix_synapse/manifest | 12 ++++++++++++ type/__matrix_synapse/parameter/boolean | 2 ++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/type/__matrix_synapse/files/homeserver.yaml.sh b/type/__matrix_synapse/files/homeserver.yaml.sh index d719d3f..64b40ee 100755 --- a/type/__matrix_synapse/files/homeserver.yaml.sh +++ b/type/__matrix_synapse/files/homeserver.yaml.sh @@ -1406,7 +1406,7 @@ account_threepid_delegates: # # Does not apply to server administrators. Defaults to 'true' # -#enable_set_displayname: false +enable_set_displayname: ${ENABLE_SET_DISPLAYNAME:?} # Whether users are allowed to change their avatar after it has been # initially set. Useful when provisioning users based on the contents @@ -1421,7 +1421,7 @@ account_threepid_delegates: # # Defaults to 'true' # -#enable_3pid_changes: false +enable_3pid_changes: ${ENABLE_3PID_CHANGES:?} # Users who register on this homeserver will automatically be joined # to these rooms. diff --git a/type/__matrix_synapse/man.rst b/type/__matrix_synapse/man.rst index d13e80a..0ec7a94 100644 --- a/type/__matrix_synapse/man.rst +++ b/type/__matrix_synapse/man.rst @@ -162,6 +162,12 @@ rc-login-burst registration-allows-email-pattern Only allow email addresses matching specified filter. Can be specified multiple times. A pattern must look like `.*@vector\.im`. +disable-displayname-changes + Whether users are allowed to change their displayname after it has been initially set. + +disable-3pid-changes + Whether users can change the 3PIDs associated with their accounts (email address and msisdn). + auto-join-room Room where newly-registered users are automatically added. Can be specified multiple times. diff --git a/type/__matrix_synapse/manifest b/type/__matrix_synapse/manifest index 6a89de6..bc76143 100755 --- a/type/__matrix_synapse/manifest +++ b/type/__matrix_synapse/manifest @@ -181,6 +181,18 @@ if [ -f "$__object/parameter/registration-requires-email" ]; then export REGISTRATION_REQUIRES_EMAIL=1 fi +ENABLE_SET_DISPLAYNAME='true' +if [ -f "$__object/parameter/disable-displayname-changes" ]; then + ENABLE_SET_DISPLAYNAME='false' +fi +export ENABLE_SET_DISPLAYNAME + +ENABLE_3PID_CHANGES='true' +if [ -f "$__object/parameter/disable-3pid-changes" ]; then + ENABLE_3PID_CHANGES='false' +fi +export ENABLE_3PID_CHANGES + if [ -f "$__object/parameter/auto-join-room" ]; then AUTO_JOIN_ROOMS="$(cat "$__object/parameter/auto-join-room")" export AUTO_JOIN_ROOMS diff --git a/type/__matrix_synapse/parameter/boolean b/type/__matrix_synapse/parameter/boolean index ac87271..54c383a 100644 --- a/type/__matrix_synapse/parameter/boolean +++ b/type/__matrix_synapse/parameter/boolean @@ -18,3 +18,5 @@ enable-message-retention-policy worker-mode enable-url-preview enable-3pid-lookups +disable-3pid-changes +disable-displayname-changes