Don't "submit it again" to restricted subreddit.

The submit link is based off the comments page of the already
submitted link. Check whether the user can submit a link to that
subreddit and if they can't don't take them to that subreddit's submit
page.
This commit is contained in:
Brian Simpson
2015-07-22 19:14:42 -04:00
parent d6d69e60b4
commit 2e8a663bc4

View File

@@ -288,8 +288,9 @@ class FrontController(RedditController):
if request.GET.get('already_submitted'):
submit_url = request.GET.get('submit_url') or article.url
resubmit_url = Link.resubmit_link(submit_url)
sr_resubmit_url = add_sr(resubmit_url)
infotext = strings.already_submitted % sr_resubmit_url
if c.user_is_loggedin and c.site.can_submit(c.user):
resubmit_url = add_sr(resubmit_url)
infotext = strings.already_submitted % resubmit_url
check_cheating('comments')