Made it so org auditors can see all users if ORG_ADMINS_CAN_SEE_ALL_USERS is true

Addresses #2706
This commit is contained in:
Akita Noek
2016-07-07 09:22:36 -04:00
parent b6ec87f18a
commit a42986894f
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -224,7 +224,8 @@ class UserAccess(BaseAccess):
if self.user.is_superuser:
return User.objects.all()
if tower_settings.ORG_ADMINS_CAN_SEE_ALL_USERS and self.user.admin_of_organizations.exists():
if tower_settings.ORG_ADMINS_CAN_SEE_ALL_USERS and \
(self.user.admin_of_organizations.exists() or self.user.auditor_of_organizations.exists()):
return User.objects.all()
return (