Fix Is_public

This commit is contained in:
yalh76 2022-02-16 20:17:10 +01:00
parent 76a2219caf
commit d242b3f7b2
4 changed files with 6 additions and 12 deletions

View file

@ -108,15 +108,6 @@ self.env.cr.commit()
chown $app:$app $conf_file chown $app:$app $conf_file
} }
ynh_sso_access () {
ynh_app_setting_set $app unprotected_uris "/"
if [[ $is_public -eq 0 ]]; then
ynh_app_setting_set $app protected_uris "$1"
fi
sudo yunohost app ssowatconf
}
ynh_configure () { ynh_configure () {
local TEMPLATE=$1 local TEMPLATE=$1
local DEST=$2 local DEST=$2

View file

@ -199,7 +199,12 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
#================================================= #=================================================
ynh_script_progression --message="Configuring permissions..." ynh_script_progression --message="Configuring permissions..."
ynh_sso_access "/web/database/manager" ynh_app_setting_set $app unprotected_uris "/"
if [[ $is_public -eq 0 ]]; then
ynh_app_setting_set $app protected_uris "/web/database/manager"
fi
sudo yunohost app ssowatconf
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -38,7 +38,6 @@ db_user=$db_name
export db_pass=$(ynh_app_setting_get --app=$app --key=psqlpwd) export db_pass=$(ynh_app_setting_get --app=$app --key=psqlpwd)
export final_path=$(ynh_app_setting_get --app=$app --key=final_path) export final_path=$(ynh_app_setting_get --app=$app --key=final_path)
export conf_file=$(ynh_app_setting_get --app=$app --key=conf_file) export conf_file=$(ynh_app_setting_get --app=$app --key=conf_file)
export is_public=0
export bin_file="$final_path/venv/bin/python $final_path/$appname/$FORKNAME-bin" export bin_file="$final_path/venv/bin/python $final_path/$appname/$FORKNAME-bin"
if [ "$app_version" = "9" ]; then if [ "$app_version" = "9" ]; then
bin_file="$final_path/venv/bin/python $final_path/$appname/$FORKNAME.py" bin_file="$final_path/venv/bin/python $final_path/$appname/$FORKNAME.py"

View file

@ -21,7 +21,6 @@ export app_version=$(ynh_app_setting_get --app=$app --key=app_version)
export oca=$(ynh_app_setting_get --app=$app --key=oca) export oca=$(ynh_app_setting_get --app=$app --key=oca)
export port=$(ynh_app_setting_get --app=$app --key=port) export port=$(ynh_app_setting_get --app=$app --key=port)
export port_chat=$(ynh_app_setting_get --app=$app --key=port_chat) export port_chat=$(ynh_app_setting_get --app=$app --key=port_chat)
export is_public=0
export final_path=$(ynh_app_setting_get --app=$app --key=final_path) export final_path=$(ynh_app_setting_get --app=$app --key=final_path)
export conf_file=$(ynh_app_setting_get --app=$app --key=conf_file) export conf_file=$(ynh_app_setting_get --app=$app --key=conf_file)
export preinstall=0 export preinstall=0