mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 00:38:11 -05:00
wiki: Ignore can_submit on the frontpage.
This commit is contained in:
@@ -108,7 +108,7 @@ def may_revise(sr, user, page=None):
|
||||
# the user may not edit.
|
||||
return False
|
||||
|
||||
if not sr.can_submit(user):
|
||||
if not sr.wiki_can_submit(user):
|
||||
# If the user can not submit to the subreddit
|
||||
# They should not be able to contribute
|
||||
return False
|
||||
|
||||
@@ -350,6 +350,9 @@ class Subreddit(Thing, Printable):
|
||||
else:
|
||||
return False
|
||||
|
||||
def wiki_can_submit(self, user):
|
||||
return self.can_submit(user)
|
||||
|
||||
def can_submit(self, user, promotion=False):
|
||||
if c.user_is_admin:
|
||||
return True
|
||||
@@ -1120,7 +1123,10 @@ class DefaultSR(_DefaultSR):
|
||||
self._base = Subreddit._by_name(g.default_sr, stale=True)
|
||||
except NotFound:
|
||||
self._base = None
|
||||
|
||||
|
||||
def wiki_can_submit(self, user):
|
||||
return True
|
||||
|
||||
@property
|
||||
def wiki_use_subreddit_karma(self):
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user