mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 07:19:25 -05:00
Wiki: Fix broken permission check for mod-only mode
This commit is contained in:
@@ -63,6 +63,10 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user