From 5b44990ce3e5abce541ae33cf5a277e8f3459ad5 Mon Sep 17 00:00:00 2001 From: Oliver Ni Date: Sat, 16 Sep 2023 08:14:33 -0700 Subject: [PATCH] Restore markdownx view permissions --- hknweb/urls.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hknweb/urls.py b/hknweb/urls.py index 5e82267c..0e068d64 100644 --- a/hknweb/urls.py +++ b/hknweb/urls.py @@ -33,7 +33,20 @@ ] markdownx_urlpatterns = [ - path("markdownx/", include("markdownx.urls")), + path( + "markdownx/upload/", + method_login_and_permission("markdown_pages.add_markdownpage")( + markdownx_views.ImageUploadView + ).as_view(), + name="markdownx_upload", + ), + path( + "markdownx/markdownify/", + method_login_and_permission("markdown_pages.add_markdownpage")( + markdownx_views.MarkdownifyView + ).as_view(), + name="markdownx_markdownify", + ), ] safe_urlpatterns = [