1
0
mirror of https://github.com/moparisthebest/SickRage synced 2025-01-05 19:08:02 -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: try:
if not (sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD): if not (sickbeard.WEB_USERNAME and sickbeard.WEB_PASSWORD):
return True return True
elif handler.request.uri.startswith('/calendar') or ( elif (handler.request.uri.startswith('/api') and '/api/builder' not in handler.request.uri):
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 return True
auth_hdr = handler.request.headers.get('Authorization') auth_hdr = handler.request.headers.get('Authorization')