1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Fixed up the _old_access.py UserAccess queryset

This commit is contained in:
Akita Noek 2016-04-29 16:57:51 -04:00
parent 6427526686
commit 1bf4fdbff1

View File

@ -206,9 +206,9 @@ class UserAccess(BaseAccess):
return qs
return qs.filter(
Q(pk=self.user.pk) |
Q(organizations__in=self.user.deprecated_admin_of_organizations) |
Q(organizations__in=self.user.deprecated_organizations) |
Q(deprecated_teams__in=self.user.deprecated_teams)
Q(deprecated_organizations__in=self.user.deprecated_admin_of_organizations.all()) |
Q(deprecated_organizations__in=self.user.deprecated_organizations.all()) |
Q(deprecated_teams__in=self.user.deprecated_teams.all())
).distinct()
def can_add(self, data):