-
Notifications
You must be signed in to change notification settings - Fork 493
Open
Description
Describe the bug
Opening a specific entry from the history shows the fields as editable, although there are no change permissions and there is no save button.
To Reproduce
Consider an admin page defined like this:
from django.contrib import admin
from .models import Package
from simple_history.admin import SimpleHistoryAdmin
class ReadonlyHistoryAdmin(SimpleHistoryAdmin):
def has_add_permission(self, request):
return False
def has_change_permission(self, request, obj=None):
return False
def has_delete_permission(self, request, obj=None):
return False
admin.site.register(Package, ReadonlyHistoryAdmin)If relevant: SIMPLE_HISTORY_REVERT_DISABLED = True is set.
Steps to reproduce the behavior:
- Go to http://localhost:8000/admin/app_name/package/
- Open a package: http://localhost:8000/admin/app_name/package/4/change/
- Open the history: http://localhost:8000/admin/app_name/package/4/history/
- Open a specific version in history: http://localhost:8000/admin/app_name/package/4/history/6/
Expected behavior
The specific version is shown as read-only form and does not allow saving.
Screenshots
Regular view:
Historic view:
Environment
- OS: OpenSUSE Leap
- Browser (if applicable): Firefox 115.6.0esr
- Django Simple History Version: 3.7.0
- Django Version: 4.2.13
- Database Version: PostgreSQL 13.14
Additional context
Additionally, it seems like the rendering of at least the heading is slightly different.
Metadata
Metadata
Assignees
Labels
No labels

