From d332dc4410f3acb74112019da473c4e2fb03b5d1 Mon Sep 17 00:00:00 2001 From: Andre D Date: Tue, 11 Dec 2012 22:44:10 -0500 Subject: [PATCH] wiki: Explicit check for a banned user. --- r2/r2/controllers/validator/wiki.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/r2/r2/controllers/validator/wiki.py b/r2/r2/controllers/validator/wiki.py index 459531124..0e5304473 100644 --- a/r2/r2/controllers/validator/wiki.py +++ b/r2/r2/controllers/validator/wiki.py @@ -84,6 +84,10 @@ def may_revise(sr, user, page=None): # Users who are wiki banned in the subreddit may not contribute return False + if sr.is_banned(user): + # If the user is banned from the subreddit, do not allow them to contribute + return False + if page and not may_view(sr, user, page): # Users who are not allowed to view the page may not contribute to the page return False