diff --git a/manifest.json b/manifest.json index e874f07..d020319 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "url": "https://epicyon.net/", "license": "AGPL-1.0-or-later", "maintainer": { - "name": "anmol" + "name": "Anmol Sharma" }, "requirements": { "yunohost": ">= 4.1.3" diff --git a/scripts/install b/scripts/install index 2cac67b..46358fa 100755 --- a/scripts/install +++ b/scripts/install @@ -131,7 +131,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap # Create admin ynh_script_progression --message="Create admin user" --weight=1 -python3 $final_path/epicyon.py --addaccount $email --password $password +python3 $final_path/epicyon.py --addaccount $admin --password $password --domain $domain #================================================= # GENERIC FINALIZATION @@ -150,6 +150,7 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 ynh_permission_update --permission="main" --add="visitors" +ynh_permission_url --permission="main" --auth_header="false" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index c695515..05e1fce 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,29 +28,6 @@ port=$(ynh_app_setting_get --app=$app --key=port) upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# 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 - -if ! ynh_permission_exists --permission="admin"; then - # Create the required permissions - ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin -fi - -# Create a permission if needed -if ! ynh_permission_exists --permission="api"; then - ynh_permission_create --permission="api" --url "/api" --allowed="visitors" --show_tile="false" --protected="true" -fi - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -145,6 +122,15 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Configuring permissions..." --weight=1 + +ynh_permission_update --permission="main" --add="visitors" + +ynh_permission_url --permission="main" --auth_header="false" + #================================================= # RELOAD NGINX #=================================================