Commit 94946f8b authored by echel0n's avatar echel0n

Added code to ensure token.json exists and if not then force logout.

parent 0707d807
......@@ -35,7 +35,7 @@ from tornado.httpclient import AsyncHTTPClient, HTTPRequest
from tornado.web import RequestHandler
import sickrage
from sickrage.core import helpers
from sickrage.core import helpers, API
from sickrage.core.databases.main import MainDB
......@@ -102,6 +102,9 @@ class BaseHandler(RequestHandler, ABC):
def get_current_user(self):
try:
if not API().token:
return self.redirect('/logout')
if self.application.settings['httpclient_secret'] == self.get_cookie('sr_httpclient_token'):
return {'email': ''}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment