Skip to content
Snippets Groups Projects
Commit 6fd2f685 authored by Erik Johnston's avatar Erik Johnston
Browse files

Simplify _check_password

parent 737aee92
No related branches found
No related tags found
No related merge requests found
......@@ -432,11 +432,15 @@ class AuthHandler(BaseHandler):
Returns:
True if the user_id successfully authenticated
"""
defer.returnValue((
(yield self._check_ldap_password(user_id, password))
or
(yield self._check_local_password(user_id, password))
))
valid_ldap = yield self._check_ldap_password(user_id, password)
if valid_ldap:
defer.returnValue(True)
valid_local_password = yield self._check_local_password(user_id, password)
if valid_local_password:
defer.returnValue(True)
defer.returnValue(False)
@defer.inlineCallbacks
def _check_local_password(self, user_id, password):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment