1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

Reduce JT read access check to simple read_role check

This commit is contained in:
Akita Noek 2016-05-02 11:27:37 -04:00
parent 83e83a5db3
commit 5825737447

View File

@ -729,8 +729,7 @@ class JobTemplateAccess(BaseAccess):
'credential', 'cloud_credential', 'next_schedule').all()
def can_read(self, obj):
# you can only see the job templates that you have permission to launch.
return self.can_start(obj, validate_license=False)
return self.user in obj.read_role
def can_add(self, data):
'''