mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
fix event querysets for non superusers
This commit is contained in:
parent
60e3dfe22c
commit
6cb237d5d9
@ -2087,7 +2087,7 @@ class ProjectUpdateEventAccess(BaseAccess):
|
|||||||
|
|
||||||
def filtered_queryset(self):
|
def filtered_queryset(self):
|
||||||
return self.model.objects.filter(
|
return self.model.objects.filter(
|
||||||
Q(project_update__in=ProjectUpdate.accessible_pk_qs(self.user, 'read_role')))
|
Q(project_update__project__in=Project.accessible_pk_qs(self.user, 'read_role')))
|
||||||
|
|
||||||
def can_add(self, data):
|
def can_add(self, data):
|
||||||
return False
|
return False
|
||||||
@ -2108,7 +2108,7 @@ class InventoryUpdateEventAccess(BaseAccess):
|
|||||||
|
|
||||||
def filtered_queryset(self):
|
def filtered_queryset(self):
|
||||||
return self.model.objects.filter(
|
return self.model.objects.filter(
|
||||||
Q(inventory_update__in=InventoryUpdate.accessible_pk_qs(self.user, 'read_role')))
|
Q(inventory_update__inventory_source__inventory__in=Inventory.accessible_pk_qs(self.user, 'read_role')))
|
||||||
|
|
||||||
def can_add(self, data):
|
def can_add(self, data):
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user