From 55e34aa5ae26b544ba78e3dc72fa2fa1a20aac10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 31 Mar 2020 22:59:00 +0200 Subject: [PATCH] Depreciate app_change_label --- locales/en.json | 1 + src/yunohost/app.py | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/locales/en.json b/locales/en.json index 885f378f1..713f1ee41 100644 --- a/locales/en.json +++ b/locales/en.json @@ -27,6 +27,7 @@ "app_install_failed": "Could not install {app}: {error}", "app_install_script_failed": "An error occurred inside the app installation script", "app_make_default_location_already_used": "Can't make the app '{app}' the default on the domain, '{domain}' is already in use by the other app '{other_app}'", + "app_label_depreciated": "This command is depreciated !! Please use the new command 'yunohost user permission update' to manage the app label.", "app_location_unavailable": "This URL is either unavailable, or conflicts with the already installed app(s):\n{apps:s}", "app_manifest_invalid": "Something is wrong with the app manifest: {error}", "app_not_upgraded": "The app '{failed_app}' failed to upgrade, and as a consequence the following apps' upgrades have been cancelled: {apps}", diff --git a/src/yunohost/app.py b/src/yunohost/app.py index a0bc87ddb..8c7c1975d 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -724,7 +724,6 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu # Set initial app settings app_settings = { 'id': app_instance_name, - 'label': label, 'install_time': int(time.time()), 'current_revision': manifest.get('remote', {}).get('revision', "?") } @@ -1356,10 +1355,8 @@ def app_change_label(app, new_label): installed = _is_installed(app) if not installed: raise YunohostError('app_not_installed', app=app, all_apps=_get_all_installed_apps_id()) - - app_setting(app, "label", value=new_label) - - app_ssowatconf() + logger.warning(m18n.n('app_label_depreciated')) + user_permission_update(app + ".main", label=new_label) # actions todo list: