diff --git a/README.md b/README.md index 8da0a91..cd6c974 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Web-based groceries & household management solution for your home -**Shipped version:** 3.1.3~ynh1 +**Shipped version:** 3.1.3~ynh2 **Demo:** https://en.demo.grocy.info/stockoverview diff --git a/README_fr.md b/README_fr.md index c9f491e..9305346 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Solution Web de gestion d'épicerie et de gestion de la maison -**Version incluse :** 3.1.3~ynh1 +**Version incluse :** 3.1.3~ynh2 **Démo :** https://en.demo.grocy.info/stockoverview diff --git a/manifest.json b/manifest.json index 44da7f4..e87d4e6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web-based groceries & household management solution for your home", "fr": "Solution Web de gestion d'épicerie et de gestion de la maison" }, - "version": "3.1.3~ynh1", + "version": "3.1.3~ynh2", "url": "https://grocy.info", "upstream": { "license": "MIT", diff --git a/scripts/install b/scripts/install index 5202159..d339473 100644 --- a/scripts/install +++ b/scripts/install @@ -114,6 +114,8 @@ then ynh_permission_update --permission="main" --add="visitors" fi +ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" + #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a17e175..aed8bcf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -60,6 +60,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Add /api permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +fi + #================================================= # CREATE DEDICATED USER #=================================================