Fix sub group audit event streaming
What does this MR do and why?
Streaming audit event is top-level group feature to receive all audit events about the group, its subgroups, and projects as structured JSON. Doc link
Currently there several events not follow the strategy:
- any event on sub-group
- sub group create/update/destroy events
- sub group deploy token create/destroy/revoke events
- group/project destroy event
fix way
- for sub-group events
- change audit_event root_group_entity from
entitytoentity.root_ancestor
- change audit_event root_group_entity from
- for group/project destroy event
- add instance variables
@entity,@root_group_entityand@root_group_entity_idin audit_event model - set
@entityafter entity destroyed - pass json format data with
root_group_entity_idtoAuditEventStreamingWorker
- add instance variables
/cc @daveliu
Edited by Linjie Zhang