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:
parent
c51477193a
commit
8533a8254d
5 changed files with 14 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue