~netlandish/django-wiki

1d101ac77cf30a7add55528da109305570beeab2 — Gustavo Andres Morero 3 years ago 967e4b8 + cf33669
Merge branch 'master' of https://github.com/netlandish/django-wiki
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
@@ 979,10 979,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: