mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 13:11:19 -03:30
do not use expensive visible_roles for Act Stream filter
This commit is contained in:
parent
3cdeb446c4
commit
7eac219eae
@ -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