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

Merge pull request #2717 from ryanpetrello/fix-2180

allow access to JT labels if you have read access to the JT
This commit is contained in:
Ryan Petrello 2018-07-31 15:28:24 -04:00 committed by GitHub
commit 0c53a0c0a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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):