mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
Merge pull request #632 from AlanCoding/some_test_fixes
do not use expensive visible_roles for Activity Stream filter
This commit is contained in:
commit
0a883edd4d
@ -2243,7 +2243,7 @@ class ActivityStreamAccess(BaseAccess):
|
||||
Q(notification_template__organization__in=auditing_orgs) |
|
||||
Q(notification__notification_template__organization__in=auditing_orgs) |
|
||||
Q(label__organization__in=auditing_orgs) |
|
||||
Q(role__in=Role.visible_roles(self.user) if auditing_orgs else [])
|
||||
Q(role__in=Role.objects.filter(ancestors__in=self.user.roles.all()) if auditing_orgs else [])
|
||||
).distinct()
|
||||
|
||||
def can_add(self, data):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user