diff --git a/files/routes/settings.py b/files/routes/settings.py index d8532f962..d38c331ad 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -193,7 +193,9 @@ def settings_personal_post(v): updated = True session["nsfw_warnings"] = int(request.values.get("nsfw_warnings") == 'true') - elif not updated and IS_EVENT() and v.can_toggle_event_music and request.values.get("event_music", v.event_music) != v.event_music: + elif not updated and IS_EVENT() and request.values.get("event_music", v.event_music) != v.event_music: + if not v.can_toggle_event_music: + abort(403, "You need to award yourself the grinch award to be able to disable event music!") updated = True session['event_music'] = request.values.get("event_music", v.event_music) == 'true' diff --git a/files/templates/settings/personal.html b/files/templates/settings/personal.html index 2eea544ff..00f7612cd 100644 --- a/files/templates/settings/personal.html +++ b/files/templates/settings/personal.html @@ -7,7 +7,7 @@
Site Experience
- {% if IS_EVENT() and v.can_toggle_event_music %} + {% if IS_EVENT() %} {{common.toggle_section('Event Music', 'event_music_switch', 'event_music', v.event_music, 'Toggle event music.', false)}} {% endif %}