mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 06:26:00 -03:30
Add support for encrypting settings that are passwords.
This commit is contained in:
@@ -103,6 +103,8 @@ class SettingSingletonDetail(RetrieveUpdateDestroyAPIView):
|
||||
for key, value in serializer.validated_data.items():
|
||||
if key == 'LICENSE':
|
||||
continue
|
||||
if settings_registry.is_setting_encrypted(key) and isinstance(value, basestring) and value.startswith('$encrypted$'):
|
||||
continue
|
||||
setattr(serializer.instance, key, value)
|
||||
setting = settings_qs.filter(key=key).order_by('pk').first()
|
||||
if not setting:
|
||||
|
||||
Reference in New Issue
Block a user