Permalink
Browse files

Limit imposing to superusers instead of everyone in staff

  • Loading branch information...
1 parent 0aa36a8 commit e7ada34d848bfe53402d50517f7da5e6db67c64c @samastur committed Mar 4, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 impostor/backend.py
  2. +1 −1 impostor/tests.py
View
@@ -35,7 +35,7 @@ def authenticate(self, username=None, password=None):
# Check if admin exists and authenticates
admin_obj = User.objects.get(username=admin)
- if admin_obj.is_staff and admin_obj.check_password(password):
+ if admin_obj.is_superuser and admin_obj.check_password(password):
try:
auth_user = User.objects.get(username=uuser)
except User.DoesNotExist:
View
@@ -14,7 +14,7 @@
class TestImpostorLogin(TestCase):
def setUp(self):
real_admin = User.objects.create(username=admin_username, password=admin_pass)
- real_admin.is_staff = True
+ real_admin.is_superuser = True
real_admin.set_password(admin_pass)
real_admin.save()

0 comments on commit e7ada34

Please sign in to comment.