executor_role -> execute_role

This commit is contained in:
Wayne Witzel III
2016-04-15 11:00:33 -04:00
parent c76976e466
commit 5bca1283b2
45 changed files with 71 additions and 71 deletions

View File

@@ -232,7 +232,7 @@ def migrate_inventory(apps, schema_editor):
raise Exception(smart_text(u'Unhandled permission type for inventory: {}'.format( perm.permission_type)))
if perm.run_ad_hoc_commands:
execrole = inventory.executor_role
execrole = inventory.execute_role
if perm.team:
if role:
@@ -392,12 +392,12 @@ def migrate_job_templates(apps, schema_editor):
for team in Team.objects.iterator():
if permission.filter(team=team).exists():
team.member_role.children.add(jt.executor_role)
team.member_role.children.add(jt.execute_role)
logger.info(smart_text(u'adding Team({}) access to JobTemplate({})'.format(team.name, jt.name)))
for user in User.objects.iterator():
if permission.filter(user=user).exists():
jt.executor_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)))
if jt.accessible_by(user, {'execute': True}):
@@ -407,5 +407,5 @@ def migrate_job_templates(apps, schema_editor):
continue
if old_access.check_user_access(user, jt.__class__, 'start', jt, False):
jt.executor_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)))