mirror of
https://github.com/ansible/awx.git
synced 2026-04-20 17:32:53 -02:30
Changed the become_method field into one that takes arbitrary input
related #2630 Signed-off-by: Jeff Bradberry <jeff.bradberry@gmail.com>
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
import copy
|
||||
import json
|
||||
import logging
|
||||
import operator
|
||||
import re
|
||||
import urllib.parse
|
||||
from collections import OrderedDict
|
||||
@@ -45,7 +44,6 @@ from awx.main.constants import (
|
||||
ANSI_SGR_PATTERN,
|
||||
ACTIVE_STATES,
|
||||
CENSOR_VALUE,
|
||||
CHOICES_PRIVILEGE_ESCALATION_METHODS,
|
||||
)
|
||||
from awx.main.models import * # noqa
|
||||
from awx.main.models.base import NEW_JOB_TYPE_CHOICES
|
||||
@@ -2499,8 +2497,7 @@ class CredentialTypeSerializer(BaseSerializer):
|
||||
if 'help_text' in field:
|
||||
field['help_text'] = _(field['help_text'])
|
||||
if field['type'] == 'become_method':
|
||||
field.pop('type')
|
||||
field['choices'] = list(map(operator.itemgetter(0), CHOICES_PRIVILEGE_ESCALATION_METHODS))
|
||||
field['type'] = 'string'
|
||||
return value
|
||||
|
||||
def filter_field_metadata(self, fields, method):
|
||||
|
||||
Reference in New Issue
Block a user