make roles case insensitive

This commit is contained in:
Anthony Young 2011-09-23 10:48:51 -07:00
parent a9f8f45267
commit bfd1aa90e0

View File

@ -41,7 +41,7 @@ class Login(forms.SelfHandlingForm):
def is_admin(token):
for role in token.user['roles']:
if role['name'] == 'Admin':
if role['name'].lower() == 'admin':
return True
return False