From 237d445cedf08a44b35b69b8d9fd276b668e522b Mon Sep 17 00:00:00 2001 From: Andre D Date: Tue, 9 Oct 2012 10:14:01 -0500 Subject: [PATCH] wiki: Correct mod only editing mode ignoring page editors. --- r2/r2/controllers/validator/wiki.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/r2/r2/controllers/validator/wiki.py b/r2/r2/controllers/validator/wiki.py index 62454053e..f500bf6f8 100644 --- a/r2/r2/controllers/validator/wiki.py +++ b/r2/r2/controllers/validator/wiki.py @@ -70,10 +70,6 @@ def may_revise(sr, user, page=None): if sr.is_moderator(user): # Mods may always contribute return True - elif sr.wikimode != 'anyone': - # If the user is not a mod and the mode is not anyone, - # then the user may not edit. - return False if page and page.restricted and not page.special: # People may not contribute to restricted pages @@ -96,6 +92,11 @@ def may_revise(sr, user, page=None): # If the user is an editor on the page, they may edit return True + if sr.wikimode != 'anyone': + # If the user is not a page editor and the mode is not everyone, + # the user may not edit. + return False + if not sr.can_submit(user): # If the user can not submit to the subreddit # They should not be able to contribute