1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rss-bridge_ynh.git synced 2024-09-03 20:25:51 +02:00

Merge pull request #31 from YunoHost-Apps/permissions

This commit is contained in:
JimboJoe 2021-04-30 13:33:06 +02:00 committed by GitHub
commit d95ec4a9bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 44 deletions

View file

@ -80,8 +80,8 @@ This is application is public and there's no notion of user.
#### Supported architectures
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rss-bridge%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/rss-bridge/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rss-bridge%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rss-bridge/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rss-bridge.svg)](https://ci-apps.yunohost.org/ci/apps/rss-bridge/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rss-bridge.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rss-bridge/)
## Limitations

View file

@ -13,14 +13,9 @@
upgrade=1 from_commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80
backup_restore=1
multi_instance=1
wrong_user=1
wrong_path=1
port_already_use=0
change_url=1
;;; Levels
# If the level 5 (Package linter) is forced to 1. Please add justifications here.
Level 5=auto
;;; Upgrade options
;;; Upgrade options
; commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80
name=Upgrade to upstream version 2018-04-06
manifest_arg=domain=DOMAIN&path=PATH&

View file

@ -9,7 +9,6 @@ location __PATH__/ {
rewrite ^ https://$server_name$request_uri? permanent;
}
### Example PHP configuration (remove it if not used)
index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
@ -26,7 +25,6 @@ location __PATH__/ {
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
### End of PHP configuration part
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;

View file

@ -15,11 +15,11 @@
},
"multi_instance": true,
"requirements": {
"yunohost": ">= 3.7"
"yunohost": ">= 4.1.0"
},
"services": [
"nginx",
"php7.0-fpm",
"php7.3-fpm",
"mysql"
],
"arguments": {
@ -27,19 +27,11 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for RSS-Bridge",
"fr": "Choisissez un domaine pour RSS-Bridge"
},
"example": "domain.org"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for RSS-Bridge",
"fr": "Choisissez un chemin pour RSS-Bridge"
},
"example": "/rss-bridge",
"default": "/rss-bridge"
}

View file

@ -99,6 +99,7 @@ fi
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -82,14 +82,14 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION
ynh_add_fpm_config
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# SPECIFIC SETUP
#=================================================
ynh_script_progression --message="Configuring RSS-Bridge..." --weight=1
# Enable every bridge
for i in $final_path/bridges/*.php ; do
echo $(basename $i) | sed "s|Bridge.php$||g" | tee -a $final_path/whitelist.txt
@ -108,10 +108,9 @@ chown -R $app: $final_path/cache
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..." --weight=1
ynh_script_progression --message="Configuring permissions..." --weight=1
# unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
ynh_permission_update --permission="main" --add="visitors"
#=================================================
# RELOAD NGINX

View file

@ -27,6 +27,18 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
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
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -41,13 +53,6 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CHECK THE PATH
#=================================================
# Normalize the URL path syntax
path_url=$(ynh_normalize_url_path --path_url=$path_url)
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -82,7 +87,7 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=3
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION
ynh_add_fpm_config
#=================================================
# SPECIFIC UPGRADE
@ -102,14 +107,6 @@ done
chown -R root: $final_path
chown -R $app: $final_path/cache
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1
# unprotected_uris allows SSO credentials to be passed anyway
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
#=================================================
# RELOAD NGINX
#=================================================