From 95e899517f7fd1e2c14f1365e996c27b23ade757 Mon Sep 17 00:00:00 2001 From: Oscar Cortez Date: Thu, 9 Jan 2020 12:26:25 -0600 Subject: [PATCH] Solve minor logical bug on create root view --- src/wiki/views/article.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wiki/views/article.py b/src/wiki/views/article.py index f3a43fbe..d161f14e 100644 --- a/src/wiki/views/article.py +++ b/src/wiki/views/article.py @@ -969,9 +969,9 @@ class CreateRootView(FormView): def dispatch(self, request, *args, **kwargs): 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 + not request.user.is_org_manager(org) + and not org.wiki_admins.filter(id=request.user.id).exists() + and not request.user.is_superuser ): return redirect("wiki:root_missing") -- 2.45.2