-
Notifications
You must be signed in to change notification settings - Fork 151
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
signals.py: Add notifiers to audit logs #473
Conversation
I think we can't just do this as-is, because Sender can sometimes include sensitive information. Lines 564 to 579 in f6a00ef
Audit.log() uses model_to_dict to dump all the information, and we need to ensure the |
According to my tests, when the "alias" field has been populated, that is what is displayed in the logs. Otherwise the value is displayed. Is that not good enough? If users do not set an alias, I guess we can assume they don't care if the value is displayed. |
Oh, I didn't check that "Show" button. Thanks! I fixed that issue in 5df5890. |
LGTM. Rebase and I'll do a final check. |
We had a query for listing notifiers in views.py::AuditList, however, we never registered any logs from signals.py, therefore the result of that query was always empty. This commit adds the necessary instructions for registering logs when creating, updating or deleting notifiers, so they will appear in the audit logs. Since the data is dumped using model_to_dict(), we also needed to modify models.py to ensure that sensible information is not displayed. That is, when the users have set the "alias" field because they want to hide the value.
5df5890
to
f88c384
Compare
Done. |
We had a query for listing notifiers in views.py::AuditList, however, we never registered any logs from signals.py, therefore the result of that query was always empty.
This commit adds the necessary instructions for registering logs when creating, updating or deleting notifiers, so they will appear in the audit logs.