1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-10 19:35:08 -05:00

Merge pull request #860 from DcR-NL/fixCalendarAuth

Fixes calendar always being unprotected
This commit is contained in:
adam111316 2014-10-09 07:52:03 +08:00
commit 4c2510d3dd

View File

@ -95,8 +95,9 @@ def authenticated(handler_class):
try:
if not (sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD):
return True
elif handler.request.uri.startswith('/calendar') or (
handler.request.uri.startswith('/api') and '/api/builder' not in handler.request.uri):
elif (handler.request.uri.startswith('/api') and '/api/builder' not in handler.request.uri):
return True
elif (handler.request.uri.startswith('/calendar') and sickbeard.CALENDAR_UNPROTECTED):
return True
auth_hdr = handler.request.headers.get('Authorization')