From 7164719f94b7bdd5e8235d117ab09a5dc3f9cbf3 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 4 May 2011 14:36:04 +0100 Subject: [PATCH] Fixes #187, Inactive users are now rejected as failed logins --- app/api/handlers/v1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/handlers/v1.py b/app/api/handlers/v1.py index 870caf9..111d98f 100644 --- a/app/api/handlers/v1.py +++ b/app/api/handlers/v1.py @@ -73,7 +73,7 @@ class LoginHandler(BaseHandler): return {'auth': 'missing', 'missing': 'Username'} if u: - if request.GET.get('pass', None) and request.GET['pass'] == u.get_profile().api_service_password: + if request.GET.get('pass', None) and u.is_active and request.GET['pass'] == u.get_profile().api_service_password: return {'auth': 'ok', 'id': u.id, 'username': u.username, 'email': u.email, 'groups': u.groups.all(), 'staff': u.is_staff, 'superuser': u.is_superuser}