mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Allow string "false" to mean False on is_superuser
This commit is contained in:
parent
ca5689c8ad
commit
46ef0475d4
@ -444,7 +444,8 @@ def disallow_superuser_escalation(cls):
|
||||
@functools.wraps(method)
|
||||
def fx(self, request, *a, **kw):
|
||||
if not request.user.is_superuser:
|
||||
if request.DATA.get('is_superuser', False):
|
||||
is_su = request.DATA.get('is_superuser', False)
|
||||
if su and su != 'false':
|
||||
raise PermissionDenied('Only superusers may create '
|
||||
'other superusers.')
|
||||
return method(self, request, *a, **kw)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user