mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 20:37:39 -02:30
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:
@@ -2387,9 +2387,7 @@ class LabelAccess(BaseAccess):
|
|||||||
prefetch_related = ('modified_by', 'created_by', 'organization',)
|
prefetch_related = ('modified_by', 'created_by', 'organization',)
|
||||||
|
|
||||||
def filtered_queryset(self):
|
def filtered_queryset(self):
|
||||||
return self.model.objects.filter(
|
return self.model.objects.all()
|
||||||
organization__in=Organization.accessible_pk_qs(self.user, 'read_role')
|
|
||||||
)
|
|
||||||
|
|
||||||
@check_superuser
|
@check_superuser
|
||||||
def can_read(self, obj):
|
def can_read(self, obj):
|
||||||
|
|||||||
Reference in New Issue
Block a user