diff --git a/jupyterhub/auth.py b/jupyterhub/auth.py index aa5430d3..35dd9c6c 100644 --- a/jupyterhub/auth.py +++ b/jupyterhub/auth.py @@ -535,14 +535,13 @@ class Authenticator(LoggingConfigurable): blocked_pass = await maybe_future( self.check_blocked_users(username, authenticated) ) - allowed_pass = await maybe_future(self.check_allowed(username, authenticated)) - if blocked_pass: - pass - else: + if not blocked_pass: self.log.warning("User %r blocked. Stop authentication", username) return + allowed_pass = await maybe_future(self.check_allowed(username, authenticated)) + if allowed_pass: if authenticated['admin'] is None: authenticated['admin'] = await maybe_future(