PromoteListingController: return 403 for non-sponsors on special sorts.

This commit is contained in:
Brian Simpson
2014-04-16 14:41:35 -04:00
parent f973a6b1e0
commit 9590c0afa7

View File

@@ -412,6 +412,11 @@ class PromoteListingController(ListingController):
if not c.user_is_loggedin or not c.user.email_verified:
# never reached--see MinimalController.on_validation_error
return self.redirect("/ad_inq")
if (sort in ('underdelivered', 'reported', 'house') and
not c.user_is_sponsor):
self.abort403()
self.sort = sort
self.sr = None
if sr and sr == Frontpage.name: