1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/libreto_ynh.git synced 2024-09-03 19:36:14 +02:00

set permissions

This commit is contained in:
ericgaspar 2021-07-02 15:45:21 +02:00
parent 7a4ef3b394
commit afc719d2bb
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 14 additions and 32 deletions

View file

@ -28,13 +28,6 @@ $providers = array(
'markdown' => false,
'html' => true,
),
'factor' => array(
'name' => "Factor",
'url' => "https://factor.cc/pad",
'default_text' => "Welcome to factor.cc Pad!",
'markdown' => false,
'html' => true,
),
'etherpad' => array(
'name' => "Etherpad.net",
'url' => "https://etherpad.net",

View file

@ -50,7 +50,6 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=etherpad_instance --value=$etherpad_instance
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=creation_open --value=$creation_open
#=================================================
@ -125,17 +124,12 @@ ynh_store_file_checksum "$final_path/config.php"
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..." --weight=1
ynh_script_progression --message="Configuring permissions..." --weight=1
# Make app public if necessary
if [ $is_public -eq 1 ]
then
if [ $creation_open -eq 1 ]
then
ynh_app_setting_set $app skipped_uris "/"
else
ynh_app_setting_set $app skipped_regex "/[^/]+"
fi
ynh_permission_update --permission="main" --add="visitors"
fi
#=================================================

View file

@ -17,7 +17,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
etherpad_instance=$(ynh_app_setting_get --app=$app --key=etherpad_instance)
creation_open=$(ynh_app_setting_get --app=$app --key=creation_open)
@ -41,6 +40,18 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -95,22 +106,6 @@ ynh_backup_if_checksum_is_different "$final_path/config.php"
# Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum "$final_path/config.php"
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1
# Make app public if necessary
if [ $is_public -eq 1 ]
then
if [ $creation_open -eq 1 ]
then
ynh_app_setting_set $app skipped_uris "/"
else
ynh_app_setting_set $app skipped_regex "/[^/]+"
fi
fi
#=================================================
# RELOAD NGINX
#=================================================