Quarantine: Disable share api endpoint.

This commit is contained in:
Matt Lee
2015-07-27 16:43:43 -07:00
committed by Florence Yeun
parent b601c465c9
commit b07d1f4c6b

View File

@@ -1938,7 +1938,9 @@ class ApiController(RedditController):
elif shareform.has_errors("ratelimit", errors.RATELIMIT):
return
if not link.subreddit_slow.can_view(c.user):
subreddit = link.subreddit_slow
if subreddit.quarantine or not subreddit.can_view(c.user):
return abort(403, 'forbidden')
emails, users = share_to