Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement post_save hook to mirror django.contrib.admin.models.LogEntry #21

Open
5 tasks
sergei-maertens opened this issue Nov 16, 2022 · 0 comments
Open
5 tasks

Comments

@sergei-maertens
Copy link
Member

From open-formulieren/open-forms#2352 it's clear that LogEntry records are cascade-deleted when the user is deleted.

To not risk losing audit trails (one of the main reasons this library is often used), we should ensure that all admin LogEntry records are copied to timeline logger - this can be done with a post_save signal. It's important that we then also serialize the user representation (str(user), if given) into the JSON field data so this can still be retrieved when the user account is deleted (by accident or malicious intent).

This behaviour should be opt-in through a setting: TIMELINE_MIRROR_ADMIN_LOGENTRY = False.

Tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant