1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Disable SSO in public mode

This commit is contained in:
Josué Tille 2020-05-07 11:00:07 +02:00
parent c51477193a
commit 8533a8254d
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
5 changed files with 14 additions and 6 deletions

View file

@ -1217,7 +1217,7 @@ saml2_config:
# Enable CAS for registration and login.
#
cas_config:
enabled: true
enabled: __SSO_ENABLED__
server_url: "https://__DOMAIN__/_matrix/cas_server.php"
service_url: "https://__DOMAIN__"
# #displayname_attribute: name

View file

@ -127,11 +127,13 @@ ynh_print_ON
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="/etc/matrix-$app/log.yaml"
if [ "$is_public" = "0" ]
if [ $is_public -eq 0 ]
then
ynh_replace_string --match_string=__ALLOWED_ACCESS__ --replace_string=False --target_file="$homeserver_config_path"
ynh_replace_string --match_string=__SSO_ENABLED__ --replace_string=True --target_file="$homeserver_config_path"
else
ynh_replace_string --match_string=__ALLOWED_ACCESS__ --replace_string=True --target_file="$homeserver_config_path"
ynh_replace_string --match_string=__SSO_ENABLED__ --replace_string=False --target_file="$homeserver_config_path"
fi
ynh_store_file_checksum --file="$homeserver_config_path"

View file

@ -121,11 +121,13 @@ apply_config() {
ynh_replace_special_string --match_string=__MACAROON_SECRET_KEY__ --replace_string="$macaroon_secret_key" --target_file="$homeserver_config_path"
fi
if [ "$is_public" = "0" ]
if [ $is_public -eq 0 ]
then
ynh_replace_string __ALLOWED_ACCESS__ False "$homeserver_config_path"
ynh_replace_string --match_string=__ALLOWED_ACCESS__ --replace_string=False --target_file="$homeserver_config_path"
ynh_replace_string --match_string=__SSO_ENABLED__ --replace_string=True --target_file="$homeserver_config_path"
else
ynh_replace_string __ALLOWED_ACCESS__ True "$homeserver_config_path"
ynh_replace_string --match_string=__ALLOWED_ACCESS__ --replace_string=True --target_file="$homeserver_config_path"
ynh_replace_string --match_string=__SSO_ENABLED__ --replace_string=False --target_file="$homeserver_config_path"
fi
ynh_store_file_checksum --file "$homeserver_config_path"

View file

@ -322,8 +322,10 @@ ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="/
if [ $is_public -eq 0 ]
then
ynh_replace_string --match_string=__ALLOWED_ACCESS__ --replace_string=False --target_file="$homeserver_config_path"
ynh_replace_string --match_string=__SSO_ENABLED__ --replace_string=True --target_file="$homeserver_config_path"
else
ynh_replace_string --match_string=__ALLOWED_ACCESS__ --replace_string=True --target_file="$homeserver_config_path"
ynh_replace_string --match_string=__SSO_ENABLED__ --replace_string=False --target_file="$homeserver_config_path"
fi
ynh_store_file_checksum --file="$homeserver_config_path"

View file

@ -268,11 +268,13 @@ ynh_print_ON
ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="/etc/matrix-$app/log.yaml"
if [ "$is_public" = "0" ]
if [ $is_public -eq 0 ]
then
ynh_replace_string --match_string=__ALLOWED_ACCESS__ --replace_string=False --target_file="$homeserver_config_path"
ynh_replace_string --match_string=__SSO_ENABLED__ --replace_string=True --target_file="$homeserver_config_path"
else
ynh_replace_string --match_string=__ALLOWED_ACCESS__ --replace_string=True --target_file="$homeserver_config_path"
ynh_replace_string --match_string=__SSO_ENABLED__ --replace_string=False --target_file="$homeserver_config_path"
fi
ynh_store_file_checksum --file="$homeserver_config_path"