Portal theme is no more as well, now handled on a per-main-domain basis

This commit is contained in:
Alexandre Aubin 2024-01-14 17:35:26 +01:00
parent b6c55c9aa6
commit e2aaf72076
3 changed files with 0 additions and 31 deletions

View file

@ -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_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": "Enable antispam",
"global_settings_setting_antispam_enabled_help": "Install and configure rspamd, a spam filtering system", "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": "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_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.", "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_password_authentication_help": "Allow password authentication for SSH",
"global_settings_setting_ssh_port": "SSH port", "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_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": "User password strength requirements",
"global_settings_setting_user_strength_help": "These requirements are only enforced when initializing or changing the password", "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", "global_settings_setting_webadmin_allowlist": "Webadmin IP allowlist",

View file

@ -150,12 +150,6 @@ name = "Email"
[misc] [misc]
name = "Other" name = "Other"
[misc.portal]
name = "User portal"
[misc.portal.portal_theme]
type = "select"
# Choices are loaded dynamically in the python code
default = "default"
[misc.backup] [misc.backup]
name = "Backup" name = "Backup"

View file

@ -201,19 +201,6 @@ class SettingsConfigPanel(ConfigPanel):
if operation_logger: if operation_logger:
operation_logger.success() 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": def _get_raw_settings(self) -> "RawSettings":
raw_settings = super()._get_raw_settings() 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_redirect_to_https")
@post_change_hook("nginx_compatibility") @post_change_hook("nginx_compatibility")
@post_change_hook("webadmin_allowlist_enabled") @post_change_hook("webadmin_allowlist_enabled")