From 81d9f7e57ecda1a737771bc9a7f3b3830c5aa361 Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Wed, 6 Apr 2016 16:30:06 -0400 Subject: [PATCH] superuser should be able to delete users without an org --- awx/main/access.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/main/access.py b/awx/main/access.py index b4abf9825d..8cf71f9f88 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -255,6 +255,8 @@ class UserAccess(BaseAccess): if obj.is_superuser and super_users.count() == 1: # cannot delete the last active superuser return False + if self.user.is_superuser: + return True return obj.accessible_by(self.user, {'delete': True})