fix bugs with system auditors and orphan JTs

This commit is contained in:
AlanCoding
2017-02-07 09:18:23 -05:00
parent 5a1b56af42
commit e5a8eb95b2
2 changed files with 8 additions and 4 deletions

View File

@@ -1048,10 +1048,6 @@ class JobTemplateAccess(BaseAccess):
return qs.select_related('created_by', 'modified_by', 'inventory', 'project',
'credential', 'cloud_credential', 'next_schedule').all()
@check_superuser
def can_read(self, obj):
return self.user in obj.read_role
def can_add(self, data):
'''
a user can create a job template if they are a superuser, an org admin