diff --git a/notebook/auth/login.py b/notebook/auth/login.py index e1c416f8e..3154577b9 100644 --- a/notebook/auth/login.py +++ b/notebook/auth/login.py @@ -69,7 +69,7 @@ class LoginHandler(IPythonHandler): typed_password = self.get_argument('password', default=u'') cookie_options = self.settings.get('cookie_options', {}) cookie_options.setdefault('httponly', True) - if self.login_available(self.settings): + if self.get_login_available(self.settings): if passwd_check(self.hashed_password, typed_password): # tornado <4.2 has a bug that considers secure==True as soon as # 'secure' kwarg is passed to set_secure_cookie @@ -129,6 +129,6 @@ class LoginHandler(IPythonHandler): return settings.get('password', u'') @classmethod - def login_available(cls, settings): + def get_login_available(cls, settings): """Whether this LoginHandler is needed - and therefore whether the login page should be displayed.""" return bool(cls.password_from_settings(settings)) diff --git a/notebook/base/handlers.py b/notebook/base/handlers.py index a4ac797d9..1bcdc58d3 100755 --- a/notebook/base/handlers.py +++ b/notebook/base/handlers.py @@ -109,7 +109,7 @@ class AuthenticatedHandler(web.RequestHandler): """ if self.login_handler is None: return False - return bool(self.login_handler.login_available(self.settings)) + return bool(self.login_handler.get_login_available(self.settings)) class IPythonHandler(AuthenticatedHandler):