Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Limit imposing to superusers instead of everyone in staff

  • Loading branch information...
commit e7ada34d848bfe53402d50517f7da5e6db67c64c 1 parent 0aa36a8
@samastur authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  impostor/backend.py
  2. +1 −1  impostor/tests.py
View
2  impostor/backend.py
@@ -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
2  impostor/tests.py
@@ -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()
Please sign in to comment.
Something went wrong with that request. Please try again.