Preventing brentozar.com from being subscribed to because their lawyer sent me a Cease and Desist nastygram.

This commit is contained in:
Samuel Clay 2014-10-14 10:43:38 -07:00
parent 63ea1673c9
commit 83b7b48817

View file

@ -59,6 +59,10 @@ from utils.ratelimit import ratelimit
from vendor.timezones.utilities import localtime_for_timezone
BANNED_URLS = [
"brentozar.com",
]
@never_cache
@render_to('reader/dashboard.xhtml')
def index(request, **kwargs):
@ -1574,6 +1578,9 @@ def add_url(request):
if not url:
code = -1
message = 'Enter in the website address or the feed URL.'
elif any([(banned_url in url) for banned_url in BANNED_URLS]):
code = -1
message = "The publisher of this website has banned NewsBlur."
else:
if new_folder:
usf, _ = UserSubscriptionFolders.objects.get_or_create(user=request.user)