mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
censor OAuth tokens from activity stream deletion records
see: https://github.com/ansible/tower/issues/1772
This commit is contained in:
@@ -494,6 +494,8 @@ def activity_stream_delete(sender, instance, **kwargs):
|
|||||||
return
|
return
|
||||||
changes = model_to_dict(instance)
|
changes = model_to_dict(instance)
|
||||||
object1 = camelcase_to_underscore(instance.__class__.__name__)
|
object1 = camelcase_to_underscore(instance.__class__.__name__)
|
||||||
|
if type(instance) == OAuth2AccessToken:
|
||||||
|
changes['token'] = TOKEN_CENSOR
|
||||||
activity_entry = ActivityStream(
|
activity_entry = ActivityStream(
|
||||||
operation='delete',
|
operation='delete',
|
||||||
changes=json.dumps(changes),
|
changes=json.dumps(changes),
|
||||||
|
|||||||
Reference in New Issue
Block a user