Skip to content

Commit 5b2d1f6

Browse files
committed
Fix the publicly viewable Draft proposal bug using slug URL
The proposals in Draft status will return 404 when accessed by anyone other than the author. Fixes #720 Signed-off-by: Nabarun Pal <[email protected]>
1 parent e47ba02 commit 5b2d1f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

junction/proposals/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ def detail_proposal(request, conference_slug, slug, hashid=None):
211211
proposal = get_object_or_404(Proposal, slug=slug, conference=conference)
212212
return HttpResponseRedirect(proposal.get_absolute_url())
213213

214-
if proposal.deleted:
214+
if proposal.deleted or (
215+
not proposal.is_public() and request.user != proposal.author
216+
):
215217
raise Http404("404")
216218

217219
# Here we have obtained the proposal that we want to display.

0 commit comments

Comments
 (0)