mirror of
https://github.com/ansible/awx.git
synced 2026-01-24 07:51:23 -03:30
redact the license key from settings.LICENSE activity stream entries
see: https://github.com/ansible/tower/issues/2671
This commit is contained in:
parent
5a7b519101
commit
1a1b9e9138
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user