mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 08:17:58 -05:00
wiki: Correct mod only editing mode ignoring page editors.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user