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

Disable admin interface from settings.py #643

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gferrate
Copy link

Disables admin interface by adding AUDITLOG_DISABLE_ADMIN_INTERFACE = False in settings.py

@@ -57,3 +57,7 @@ def has_delete_permission(self, request, obj=None):
def get_queryset(self, request):
self.request = request
return super().get_queryset(request=request)


if not settings.AUDITLOG_DISABLE_ADMIN_INTERFACE:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change the settings name to AUDITLOG_ENABLE_ADMIN_INTERFACE with default value of True

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Makes sense

@@ -463,3 +463,10 @@ Django Admin integration

When ``auditlog`` is added to your ``INSTALLED_APPS`` setting a customized admin class is active providing an enhanced
Django Admin interface for log entries.


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add .. versionadded:: 3.1.0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hramezani
Copy link
Member

Thanks @gferrate for this PR. I left some comments.

Please add a test and also changelog into https://github.com/jazzband/django-auditlog/blob/master/CHANGELOG.md

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.29%. Comparing base (5289482) to head (456b17e).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #643      +/-   ##
==========================================
+ Coverage   95.21%   95.29%   +0.07%     
==========================================
  Files          31       31              
  Lines        1025     1042      +17     
==========================================
+ Hits          976      993      +17     
  Misses         49       49              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gferrate gferrate changed the title Disabled admin interface from settings.py Disable admin interface from settings.py May 17, 2024
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

Successfully merging this pull request may close these issues.

2 participants