From cf62dff30256c30e796bc60744177f5d258261e8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Jan 2024 17:35:26 +0100 Subject: [PATCH] Portal theme is no more as well, now handled on a per-main-domain basis --- locales/en.json | 3 --- src/settings.py | 22 ---------------------- 2 files changed, 25 deletions(-) diff --git a/locales/en.json b/locales/en.json index 7c56c0793b..51aced2890 100644 --- a/locales/en.json +++ b/locales/en.json @@ -450,8 +450,6 @@ "global_settings_setting_pop3_enabled_help": "Enable the POP3 protocol for the mail server. POP3 is an older protocol to access mailboxes from email clients and is more lightweight, but has less features than IMAP (enabled by default)", "global_settings_setting_antispam_enabled": "Enable antispam", "global_settings_setting_antispam_enabled_help": "Install and configure rspamd, a spam filtering system", - "global_settings_setting_portal_theme": "Portal theme", - "global_settings_setting_portal_theme_help": "More info regarding creating custom portal themes at https://yunohost.org/theming", "global_settings_setting_postfix_compatibility": "Postfix Compatibility", "global_settings_setting_postfix_compatibility_help": "Compatibility vs. security tradeoff for the Postfix server. Affects the ciphers (and other security-related aspects)", "global_settings_setting_root_access_explain": "On Linux systems, 'root' is the absolute admin. In YunoHost context, direct 'root' SSH login is by default disable - except from the local network of the server. Members of the 'admins' group can use the sudo command to act as root from the command line. However, it can be helpful to have a (robust) root password to debug the system if for some reason regular admins can not login anymore.", @@ -473,7 +471,6 @@ "global_settings_setting_ssh_password_authentication_help": "Allow password authentication for SSH", "global_settings_setting_ssh_port": "SSH port", "global_settings_setting_ssh_port_help": "A port lower than 1024 is preferred to prevent usurpation attempts by non-administrator services on the remote machine. You should also avoid using a port already in use, such as 80 or 443.", - "global_settings_setting_ssowat_panel_overlay_enabled": "Enable the small 'YunoHost' portal shortcut square on apps", "global_settings_setting_user_strength": "User password strength requirements", "global_settings_setting_user_strength_help": "These requirements are only enforced when initializing or changing the password", "global_settings_setting_webadmin_allowlist": "Webadmin IP allowlist", diff --git a/src/settings.py b/src/settings.py index e7f30085c1..71b250fdc6 100644 --- a/src/settings.py +++ b/src/settings.py @@ -201,19 +201,6 @@ def reset( if operation_logger: operation_logger.success() - def _get_raw_config(self) -> "RawConfig": - raw_config = super()._get_raw_config() - - # Dynamic choice list for portal themes - THEMEDIR = "/usr/share/ssowat/portal/assets/themes/" - try: - themes = [d for d in os.listdir(THEMEDIR) if os.path.isdir(THEMEDIR + d)] - except Exception: - themes = ["unsplash", "vapor", "light", "default", "clouds"] - raw_config["misc"]["portal"]["portal_theme"]["choices"] = themes - - return raw_config - def _get_raw_settings(self) -> "RawSettings": raw_settings = super()._get_raw_settings() @@ -316,15 +303,6 @@ def trigger_post_change_hook(setting_name, old_value, new_value): # =========================================== -@post_change_hook("portal_theme") -def regen_ssowatconf(setting_name, old_value, new_value): - if old_value != new_value: - from yunohost.app import app_ssowatconf - - app_ssowatconf() - - -@post_change_hook("ssowat_panel_overlay_enabled") @post_change_hook("nginx_redirect_to_https") @post_change_hook("nginx_compatibility") @post_change_hook("webadmin_allowlist_enabled")