Skip to content

Commit

Permalink
Portal theme is no more as well, now handled on a per-main-domain basis
Browse files Browse the repository at this point in the history
  • Loading branch information
alexAubin committed Jan 14, 2024
1 parent b6c55c9 commit e2aaf72
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
3 changes: 0 additions & 3 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions share/config_global.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,6 @@ name = "Email"

[misc]
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]
name = "Backup"
Expand Down
22 changes: 0 additions & 22 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit e2aaf72

Please sign in to comment.