Merge pull request #2709 from ryanpetrello/fix-2671

redact the license key from settings.LICENSE activity stream entries
This commit is contained in:
Ryan Petrello 2018-07-30 12:28:48 -04:00 committed by GitHub
commit 6e3686bfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,14 @@ class Setting(CreatedModifiedModel):
def get_cache_id_key(self, key):
return '{}_ID'.format(key)
def display_value(self):
if self.key == 'LICENSE' and 'license_key' in self.value:
# don't log the license key in activity stream
value = self.value.copy()
value['license_key'] = '********'
return value
return self.value
import awx.conf.signals # noqa