fix settings page
This commit is contained in:
Binary file not shown.
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user