add/remove users from whitelist when adding/deleting

This commit is contained in:
MinRK
2014-09-15 01:20:50 -07:00
parent ac6b4788a5
commit 294fa8ceb6
2 changed files with 23 additions and 1 deletions

View File

@@ -51,6 +51,10 @@ class BaseHandler(RequestHandler):
@property
def hub(self):
return self.settings['hub']
@property
def authenticator(self):
return self.settings.get('authenticator', None)
#---------------------------------------------------------------
# Login and cookie-related
@@ -139,7 +143,7 @@ class BaseHandler(RequestHandler):
@gen.coroutine
def authenticate(self, data):
auth = self.settings.get('authenticator', None)
auth = self.authenticator
if auth is not None:
result = yield auth.authenticate(self, data)
raise gen.Return(result)