fix settings page

This commit is contained in:
2025-06-10 11:48:34 +02:00
parent 5bb0667060
commit b96d5e4487
5 changed files with 75 additions and 10 deletions

View File

@@ -901,9 +901,14 @@ def init_routes(main_bp):
def settings():
if not current_user.is_admin:
flash('You do not have permission to access settings.', 'error')
return redirect(url_for('main.index'))
return redirect(url_for('main.home'))
active_tab = request.args.get('tab', 'colors')
# Validate tab parameter
valid_tabs = ['colors', 'general', 'email_templates', 'mails', 'security', 'events', 'debugging', 'smtp']
if active_tab not in valid_tabs:
active_tab = 'colors'
site_settings = SiteSettings.get_settings()
company_form = CompanySettingsForm()