mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 06:26:00 -03:30
add notifications to cleanup_jobs
This commit is contained in:
@@ -2024,9 +2024,9 @@ class NotificationAccess(BaseAccess):
|
||||
model = Notification
|
||||
|
||||
def get_queryset(self):
|
||||
qs = self.model.objects.all()
|
||||
qs = self.model.objects.prefetch_related('notification_template')
|
||||
if self.user.is_superuser or self.user.is_system_auditor:
|
||||
return qs
|
||||
return qs.all()
|
||||
return self.model.objects.filter(
|
||||
Q(notification_template__organization__in=self.user.admin_of_organizations) |
|
||||
Q(notification_template__organization__in=self.user.auditor_of_organizations)
|
||||
|
||||
Reference in New Issue
Block a user