mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Merge pull request #9912 from fosterseth/fix_t4919_jt_slow_load
Return distinct labels for normal Users SUMMARY Create a single label and add it to 2 or more JTs Visit /api/v2/labels as superuser and you'll see a single label Create a normal user and give admin role to each JT in step 1 Visit /api/v2/labels as this normal user and you will see duplicate entries for the label. Number of entries will be equal to the number of JTs in step 1 ISSUE TYPE Bugfix Pull Request COMPONENT NAME API AWX VERSION awx: 19.0.0 Reviewed-by: Seth Foster <None> Reviewed-by: Jeff Bradberry <None>
This commit is contained in:
commit
0ca024c929
@ -2627,7 +2627,7 @@ class LabelAccess(BaseAccess):
|
||||
return self.model.objects.filter(
|
||||
Q(organization__in=Organization.accessible_pk_qs(self.user, 'read_role'))
|
||||
| Q(unifiedjobtemplate_labels__in=UnifiedJobTemplate.accessible_pk_qs(self.user, 'read_role'))
|
||||
)
|
||||
).distinct()
|
||||
|
||||
@check_superuser
|
||||
def can_add(self, data):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user