Skip to content

Commit

Permalink
Allow gfm and commonmark
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsmkn committed Sep 23, 2024
1 parent 74d4ad3 commit ab744e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/grandchallenge/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def test_func(self):
return self.request.user.is_staff

def get_object(self, *args, **kwargs):
if not self.kwargs["format"].startswith("markdown"):
if not any(
self.kwargs["format"].startswith(f)
for f in {"markdown", "gfm", "commonmark"}
):
raise PermissionDenied()
return super().get_object(*args, **kwargs)

Expand Down

0 comments on commit ab744e3

Please sign in to comment.