From c440aefd8544475eb4d1d3a13cd2f6ca990f6af0 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Fri, 15 Apr 2016 16:08:14 -0400 Subject: [PATCH] fix jt tests --- awx/main/migrations/_rbac.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/migrations/_rbac.py b/awx/main/migrations/_rbac.py index 4f37cf4c14..0d7aa3ecb7 100644 --- a/awx/main/migrations/_rbac.py +++ b/awx/main/migrations/_rbac.py @@ -390,7 +390,7 @@ def migrate_job_templates(apps, schema_editor): jt.execute_role.members.add(user) logger.info(smart_text(u'adding User({}) access to JobTemplate({})'.format(user.username, jt.name))) - if jt.accessible_by(user, {'execute': True}): + if user in jt.execute_role: # If the job template is already accessible by the user, because they # are a sytem, organization, or project admin, then don't add an explicit # role entry for them