mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Fix config panel with tags
This commit is contained in:
parent
42b6143104
commit
9cdcf07c2b
2 changed files with 12 additions and 5 deletions
|
@ -33,13 +33,13 @@ services = ["__APP__"]
|
|||
[main.welcome.allowed_local_3pids_email]
|
||||
ask = "Register only with given email formats"
|
||||
type = "tags"
|
||||
help = '( e.g. ^[^@]+@matrix\\\\.org$ ) Note that \\\ will write \\ as suggested in homeserver.yaml'
|
||||
help = '( e.g. ^[^@]+@matrix\\.org$ )'
|
||||
visible = 'enable_registration && (registrations_require_3pid == "email" || registrations_require_3pid == "email&msisdn")'
|
||||
|
||||
[main.welcome.allowed_local_3pids_msisdn]
|
||||
ask = "Register only with given phone number formats"
|
||||
type = "tags"
|
||||
help = '( e.g. \\\\+33 ) Note that \\\ will write \\ as suggested in homeserver.yaml'
|
||||
help = '( e.g. \\+33 )'
|
||||
visible = 'enable_registration && (registrations_require_3pid == "email&msisdn" || registrations_require_3pid == "msisdn")'
|
||||
|
||||
[main.welcome.disable_msisdn_registration]
|
||||
|
|
|
@ -62,7 +62,10 @@ configure_synapse() {
|
|||
local macaroon_secret_key_param='macaroon_secret_key: "'$macaroon_secret_key'"'
|
||||
local auto_join_rooms_sed_param=""
|
||||
if [ -n "$auto_join_rooms" ]; then
|
||||
auto_join_rooms_sed_param='auto_join_rooms:\n - "'$auto_join_rooms'"'
|
||||
auto_join_rooms_sed_param+='auto_join_rooms:'
|
||||
while read -d, room; do
|
||||
auto_join_rooms_sed_param+='\n - "'$room'"'
|
||||
done <<< "${auto_join_rooms},"
|
||||
fi
|
||||
local registration_require_3pid_sed_param=""
|
||||
case ${registrations_require_3pid} in
|
||||
|
@ -82,10 +85,14 @@ configure_synapse() {
|
|||
allowd_local_3pids_sed_param="allowed_local_3pids:"
|
||||
|
||||
if [ -n "$allowed_local_3pids_email" ]; then
|
||||
allowd_local_3pids_sed_param+="\n - medium: email\n pattern: '$allowed_local_3pids_email'"
|
||||
while read -d, pattern ; do
|
||||
allowd_local_3pids_sed_param+="\n - medium: email\n pattern: '$pattern'"
|
||||
done <<< "${allowed_local_3pids_email},"
|
||||
fi
|
||||
if [ -n "$allowed_local_3pids_msisdn" ]; then
|
||||
allowd_local_3pids_sed_param+="\n - medium: msisdn\n pattern: '$allowed_local_3pids_msisdn'"
|
||||
while read -d, pattern ; do
|
||||
allowd_local_3pids_sed_param+="\n - medium: msisdn\n pattern: '$pattern'"
|
||||
done <<< "${allowed_local_3pids_msisdn},"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue