mirror of
https://github.com/ansible/awx.git
synced 2026-03-24 12:25:01 -02:30
fix jt tests
This commit is contained in:
@@ -390,7 +390,7 @@ def migrate_job_templates(apps, schema_editor):
|
|||||||
jt.execute_role.members.add(user)
|
jt.execute_role.members.add(user)
|
||||||
logger.info(smart_text(u'adding User({}) access to JobTemplate({})'.format(user.username, jt.name)))
|
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
|
# 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
|
# are a sytem, organization, or project admin, then don't add an explicit
|
||||||
# role entry for them
|
# role entry for them
|
||||||
|
|||||||
Reference in New Issue
Block a user