Skip to content

Commit

Permalink
#3977: Download XML/PDF urls only available if article is published
Browse files Browse the repository at this point in the history
  • Loading branch information
mauromsl authored and ajrbyers committed Feb 20, 2024
1 parent 0a4424d commit bb0807b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/journal/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ def serve_article_xml(request, identifier_type, identifier):
identifier,
)

if not article_object:
if not article_object and not article_object.is_published:
raise Http404

xml_galleys = article_object.galley_set.filter(
Expand Down Expand Up @@ -2503,7 +2503,7 @@ def serve_article_pdf(request, identifier_type, identifier):
identifier,
)

if not article_object:
if not article_object and not article_object.is_published:
raise Http404

pdf = article_object.pdfs.first()
Expand Down

0 comments on commit bb0807b

Please sign in to comment.