diff --git a/scripts/upgrade b/scripts/upgrade index 7bd0986..6ef09b6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -69,6 +69,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Create a 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 #=================================================