mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
Allow more falsy values.
This commit is contained in:
parent
46ef0475d4
commit
8b1f3c33a5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user