diff --git a/internal/config/config.go b/internal/config/config.go index 5a27abd..cef36bc 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -46,14 +46,6 @@ type Config struct { RequireEmailConfirmation bool MFAEnabledByDefault bool - // Email (SMTP) settings - SMTPHost string - SMTPPort int - SMTPUsername string - SMTPPassword string - SMTPSender string - SMTPUseTLS bool - // Security settings (failed-login thresholds and auto-ban config) PwdFailuresThreshold int MFAFailuresThreshold int @@ -94,17 +86,9 @@ var defaultConfig = map[string]map[string]string{ }, "AUTH": { "REQUIRE_ADMIN_ACTIVATION": "true", - "REQUIRE_EMAIL_CONFIRMATION": "true", + "REQUIRE_EMAIL_CONFIRMATION": "false", "MFA_ENABLED_BY_DEFAULT": "false", }, - "EMAIL": { - "SMTP_HOST": "", - "SMTP_PORT": "587", - "SMTP_USERNAME": "", - "SMTP_PASSWORD": "", - "SMTP_SENDER": "", - "SMTP_USE_TLS": "true", - }, "SECURITY": { "PWD_FAILURES_THRESHOLD": "5", "MFA_FAILURES_THRESHOLD": "10", @@ -228,15 +212,6 @@ func Load() (*Config, error) { config.RequireEmailConfirmation, _ = authSection.Key("REQUIRE_EMAIL_CONFIRMATION").Bool() config.MFAEnabledByDefault, _ = authSection.Key("MFA_ENABLED_BY_DEFAULT").Bool() - // Load EMAIL (SMTP) section - emailSection := cfg.Section("EMAIL") - config.SMTPHost = emailSection.Key("SMTP_HOST").String() - config.SMTPPort, _ = emailSection.Key("SMTP_PORT").Int() - config.SMTPUsername = emailSection.Key("SMTP_USERNAME").String() - config.SMTPPassword = emailSection.Key("SMTP_PASSWORD").String() - config.SMTPSender = emailSection.Key("SMTP_SENDER").String() - config.SMTPUseTLS, _ = emailSection.Key("SMTP_USE_TLS").Bool() - // Load SECURITY section secSection := cfg.Section("SECURITY") config.PwdFailuresThreshold, _ = secSection.Key("PWD_FAILURES_THRESHOLD").Int() @@ -408,23 +383,6 @@ func (c *Config) SaveSetting(section, key, value string) error { case "MFA_ENABLED_BY_DEFAULT": c.MFAEnabledByDefault = value == "true" } - case "EMAIL": - switch key { - case "SMTP_HOST": - c.SMTPHost = value - case "SMTP_PORT": - if v, err := strconv.Atoi(value); err == nil { - c.SMTPPort = v - } - case "SMTP_USERNAME": - c.SMTPUsername = value - case "SMTP_PASSWORD": - c.SMTPPassword = value - case "SMTP_SENDER": - c.SMTPSender = value - case "SMTP_USE_TLS": - c.SMTPUseTLS = value == "true" - } case "SECURITY": switch key { case "PWD_FAILURES_THRESHOLD": diff --git a/web/templates/admin.html b/web/templates/admin.html index 0a993fd..59e2feb 100644 --- a/web/templates/admin.html +++ b/web/templates/admin.html @@ -11,6 +11,22 @@
Access logs and security controls
+Access logs and security controls
-