Disallow submitting to banned Subreddits via API

This commit is contained in:
Keith Mitchell
2013-04-10 15:47:09 -07:00
parent 21f07e8c52
commit 702b58565f

View File

@@ -347,6 +347,8 @@ class Subreddit(Thing, Printable):
return True
elif self.is_banned(user) and not promotion:
return False
elif self.spammy():
return False
elif self.type == 'public':
return True
elif self.is_moderator(user) or self.is_contributor(user):