From ee0e549978d28a8fdada5ee7266c2eee9ad8195e Mon Sep 17 00:00:00 2001 From: Luke Sneeringer Date: Thu, 20 Nov 2014 14:04:18 -0600 Subject: [PATCH] Silly variable inconsistency. --- 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 58ae549989..953708fa90 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 not in ('false', 'f', 'False', '0'): + if is_su and is_su not in ('false', 'f', 'False', '0'): raise PermissionDenied('Only superusers may create ' 'other superusers.') return method(self, request, *a, **kw)