wiki: Ignore can_submit on the frontpage.

This commit is contained in:
Andre D
2013-02-22 13:56:57 -05:00
committed by Neil Williams
parent 0bb4605a53
commit 21bf80fca5
2 changed files with 8 additions and 2 deletions

View File

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

View File

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