Skip to content

Commit

Permalink
Make all schedule formats respect the feature flag
Browse files Browse the repository at this point in the history
People can still guess proposal URLs but this hopefully makes it clear
that it's not published yet.
  • Loading branch information
marksteward committed May 22, 2024
1 parent 13696f9 commit 3658ea1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/schedule/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from models.user import User
from models.cfp import Proposal

from ..common import feature_flag, json_response
from ..common import feature_flag, feature_enabled, json_response
from .schedule_xml import export_frab
from .historic import feed_historic
from .data import (
Expand Down Expand Up @@ -37,6 +37,9 @@ def schedule_json(year):
if year != event_year():
return feed_historic(year, "json")

if not feature_enabled('SCHEDULE'):
abort(404)

schedule = [_convert_time_to_str(p) for p in _get_scheduled_proposals(request.args)]

# NB this is JSON in a top-level array (security issue for low-end browsers)
Expand All @@ -48,6 +51,9 @@ def schedule_frab(year):
if year != event_year():
return feed_historic(year, "frab")

if not feature_enabled('SCHEDULE'):
abort(404)

schedule = (
Proposal.query.filter(
Proposal.is_accepted,
Expand All @@ -72,6 +78,9 @@ def schedule_ical(year):
if year != event_year():
return feed_historic(year, "ics")

if not feature_enabled('SCHEDULE'):
abort(404)

schedule = _get_scheduled_proposals(request.args)
title = "EMF {}".format(event_year())

Expand Down

0 comments on commit 3658ea1

Please sign in to comment.