mirror of
https://github.com/ansible/awx.git
synced 2026-09-03 10:28:29 -02:30
don't allow boolean credential type fields that specify secret
secret doesn't really make sense for boolean values; they can't store sensitive content because they're just true|false see: https://github.com/ansible/ansible-tower/issues/6776
This commit is contained in:
@@ -624,7 +624,7 @@ class CredentialTypeInputField(JSONSchemaField):
|
||||
# If no type is specified, default to string
|
||||
field['type'] = 'string'
|
||||
|
||||
for key in ('choices', 'multiline', 'format'):
|
||||
for key in ('choices', 'multiline', 'format', 'secret',):
|
||||
if key in field and field['type'] != 'string':
|
||||
raise django_exceptions.ValidationError(
|
||||
_('%s not allowed for %s type (%s)' % (key, field['type'], field['id'])),
|
||||
|
||||
Reference in New Issue
Block a user