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

Merge pull request #1220 from AlanCoding/fix_check_related

fix bug where role name was given incorrectly
This commit is contained in:
Alan Rominger 2018-04-03 15:12:23 -04:00 committed by GitHub
commit ac1bc08480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1861,7 +1861,7 @@ class WorkflowJobTemplateAccess(BaseAccess):
if self.user.is_superuser:
return True
return (self.check_related('organization', Organization, data, role_field='workflow_admin_field', obj=obj) and
return (self.check_related('organization', Organization, data, role_field='workflow_admin_role', obj=obj) and
self.user in obj.admin_role)
def can_delete(self, obj):