wiki: Correct mod only editing mode ignoring page editors.

This commit is contained in:
Andre D
2012-10-09 10:14:01 -05:00
committed by Neil Williams
parent 5550ceb093
commit 237d445ced

View File

@@ -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