diff --git a/r2/r2/controllers/validator/wiki.py b/r2/r2/controllers/validator/wiki.py index 24336031b..9a9bf932e 100644 --- a/r2/r2/controllers/validator/wiki.py +++ b/r2/r2/controllers/validator/wiki.py @@ -96,16 +96,6 @@ 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 - return False - if page and page.special: # If this is a special page # (and the user is not a mod or page editor) @@ -121,6 +111,17 @@ def may_revise(sr, user, page=None): # If the user is a wiki contributor, they may revise return True + if sr.wikimode != 'anyone': + # If the user is not a page editor or wiki contributor, + # 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 + return False + karma = max(user.karma('link', sr), user.karma('comment', sr)) if karma < (sr.wiki_edit_karma or 0): # If the user has too few karma, they should not contribute