-
Notifications
You must be signed in to change notification settings - Fork 420
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
Disable logging remote IP address #620
Disable logging remote IP address #620
Conversation
Thanks @Nathan-Cohen for this PR.
|
e7144ab
to
693a509
Compare
@hramezani It's done, let me know if I need to make any other changes. |
for more information, see https://pre-commit.ci
auditlog_tests/tests.py
Outdated
@@ -1273,6 +1273,12 @@ def test_register_from_settings_invalid_settings(self): | |||
): | |||
self.test_auditlog.register_from_settings() | |||
|
|||
with override_settings(AUDITLOG_DISABLE_REMOTE_ADDR="str"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to move this test in MiddlewareTest because the checking is in middleware init
Thanks @Nathan-Cohen for the update. Please add a test to showing enabling |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #620 +/- ##
==========================================
+ Coverage 95.21% 95.24% +0.02%
==========================================
Files 31 31
Lines 1025 1031 +6
==========================================
+ Hits 976 982 +6
Misses 49 49 ☔ View full report in Codecov by Sentry. |
Thanks @Nathan-Cohen |
Hello,
I've created this Pull Request in response to the user's request regarding the possibility to disable logging of the remote IP address in django-auditlog's audit logs (#524). This feature is desirable in the context of personal data protection, especially in compliance with the General Data Protection Regulation (GDPR).
In this Pull Request, I've added a new configuration, AUDITLOG_DISABLE_REMOTE_ADDR, which allows disabling the logging of the remote IP address. When this configuration is enabled, the remote IP address will no longer be recorded in the audit logs.
I've had to deal with this problem myself and I think it's important to address it for reasons of data confidentiality, which is why I've done this.