1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

allow access to JT labels if you have read access to the JT

see: https://github.com/ansible/tower/issues/2180
This commit is contained in:
Ryan Petrello 2018-07-31 10:41:03 -04:00
parent ef242483b3
commit 0aaa3807a9
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -2387,9 +2387,7 @@ class LabelAccess(BaseAccess):
prefetch_related = ('modified_by', 'created_by', 'organization',)
def filtered_queryset(self):
return self.model.objects.filter(
organization__in=Organization.accessible_pk_qs(self.user, 'read_role')
)
return self.model.objects.all()
@check_superuser
def can_read(self, obj):