~netlandish/django-wiki

33554005bbf2824738e5ad4619dbbd1d8eed2d56 — Oscar Cortez 4 years ago 62246c6 + cf33669
Merge branch 'master' into org-support
1 files changed, 6 insertions(+), 2 deletions(-)

M src/wiki/views/article.py
M src/wiki/views/article.py => src/wiki/views/article.py +6 -2
@@ 967,10 967,14 @@ class CreateRootView(FormView):
    template_name = 'wiki/create_root.html'

    def dispatch(self, request, *args, **kwargs):
        if not request.user.is_superuser:
        org = request.organization
        if (
            not request.user.is_org_manager
            or not org.wiki_admins.filter(id=request.user.id).exists()
            or not request.user.is_superuser
        ):
            return redirect("wiki:root_missing")

        org = request.organization
        try:
            root = models.URLPath.root(org)
            if request.method == "GET" and root.article.organization != org: