mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03:30
Make job queryset only require JT read access to see
As opposed to credential access, since users can see and potentially run JT's without credential access now.
This commit is contained in:
@@ -838,9 +838,7 @@ class JobAccess(BaseAccess):
|
||||
if self.user.is_superuser:
|
||||
return qs.all()
|
||||
|
||||
credential_ids = self.user.get_queryset(Credential)
|
||||
return qs.filter(
|
||||
credential_id__in=credential_ids,
|
||||
job_template__in=JobTemplate.accessible_objects(self.user, 'read_role')
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user