diff --git a/README.md b/README.md index ca51677..1c1509b 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ With GoToSocial, you can keep in touch with your friends, post, read, and share Documentation is at [docs.gotosocial.org](https://docs.gotosocial.org). -**Shipped version:** 0.8.0~ynh2 +**Shipped version:** 0.8.0~ynh3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5be7537..c887184 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,7 @@ Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et p Vous pouvez consulter la documentation à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org). -**Version incluse :** 0.8.0~ynh2 +**Version incluse :** 0.8.0~ynh3 ## Captures d’écran diff --git a/config_panel.toml b/config_panel.toml index bef576a..3b6b032 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -19,7 +19,7 @@ name = "Accounts config" help = "Config pertaining to creation and maintenance of accounts on the server, as well as defaults for new accounts." -[main.accounts.registration_open] +[main.accounts.accounts_registration_open] ask.en = "Open registrations?" ask.fr = "Inscriptions ouvertes ?" bind = "accounts-registration-open:__FINALPATH__/config.yaml" @@ -29,7 +29,7 @@ help.en = "Do we want people to be able to just submit sign up requests, or do w help.fr = "Voulez-vous que les gens puissent simplement envoyer des demandes d'inscription, ou voulez-vous qu'iels doivent être invité-e-s ?" type = "select" -[main.accounts.approval_required] +[main.accounts.accounts_approval_required] ask.en = "Approval required?" ask.fr = "Validation requise ?" bind = "accounts-approval-required:__FINALPATH__/config.yaml" @@ -39,7 +39,7 @@ help.en = "Do sign up requests require approval from an admin/moderator before a help.fr = "Les demandes d'inscription doivent-elles être approuvées par un-e administrateur-ice/modérateur-ice avant qu'un compte puisse se connecter/utiliser le serveur ?" type = "select" -[main.accounts.reason_required] +[main.accounts.accounts_reason_required] ask.en = "Reason required?" ask.fr = "Motif requis ?" bind = "accounts-reason-required:__FINALPATH__/config.yaml" @@ -49,7 +49,7 @@ help.en = "Are sign up requests required to submit a reason for the request (eg. help.fr = "Les demandes d'inscription doivent-elles être motivées (par exemple, par une explication de la raison pour laquelle la personne souhaite rejoindre l'instance) ?" type = "select" -[main.accounts.allow_custom_css] +[main.accounts.accounts_allow_custom_css] ask.en = "Allow custom CSS?" ask.fr = "Autoriser le CSS personnalisé ?" bind = "accounts-allow-custom-css:__FINALPATH__/config.yaml" diff --git a/manifest.json b/manifest.json index 6783547..0ba3e16 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ActivityPub social network server", "fr": "Serveur de réseau social basé sur ActivityPub" }, - "version": "0.8.0~ynh2", + "version": "0.8.0~ynh3", "url": "https://github.com/superseriousbusiness/gotosocial", "upstream": { "license": "AGPL-3.0-only", @@ -114,4 +114,4 @@ } ] } -} \ No newline at end of file +} diff --git a/scripts/upgrade b/scripts/upgrade index 33d3f7f..16def1b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -264,6 +264,37 @@ then ynh_app_setting_set --app="$app" --key=smtp_disclose_recipients --value="$smtp_disclose_recipients" fi +# Upgrade from <0.8.0~ynh3: +if ynh_compare_current_package_version --comparison lt --version 0.8.0~ynh3 +then + # get settings from problem key + allow_custom_css=$(ynh_app_setting_get --app="$app" --key=allow_custom_css) + approval_required=$(ynh_app_setting_get --app="$app" --key=approval_required) + reason_required=$(ynh_app_setting_get --app="$app" --key=reason_required) + registration_open=$(ynh_app_setting_get --app="$app" --key=registration_open) + # apply setting to correct key if set on old key + if [ -n "$allow_custom_css" ] + then + ynh_app_setting_set --app="$app" --key=accounts_allow_custom_css --value="$allow_custom_css" + ynh_app_setting_delete --app="$app" --key=allow_custom_css + fi + if [ -n "$approval_required" ] + then + ynh_app_setting_set --app="$app" --key=accounts_approval_required --value="$approval_required" + ynh_app_setting_delete --app="$app" --key=approval_required + fi + if [ -n "$reason_required" ] + then + ynh_app_setting_set --app="$app" --key=accounts_reason_required --value="$reason_required" + ynh_app_setting_delete --app="$app" --key=reason_required + fi + if [ -n "$registration_open" ] + then + ynh_app_setting_set --app="$app" --key=accounts_registration_open --value="$registration_open" + ynh_app_setting_delete --app="$app" --key=registration_open + fi +fi + #================================================= # CREATE DEDICATED USER #=================================================