From 8b1f3c33a54b60e32942b8ea14ed32e50671b776 Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 20 Nov 2014 11:13:26 -0600 Subject: [PATCH] Allow more falsy values. --- awx/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/views.py b/awx/api/views.py index a4af5c8e15..58ae549989 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -445,7 +445,7 @@ def disallow_superuser_escalation(cls): def fx(self, request, *a, **kw): if not request.user.is_superuser: is_su = request.DATA.get('is_superuser', False) - if su and su != 'false': + if su and su not in ('false', 'f', 'False', '0'): raise PermissionDenied('Only superusers may create ' 'other superusers.') return method(self, request, *a, **kw)