make roles case insensitive
This commit is contained in:
parent
a9f8f45267
commit
bfd1aa90e0
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user