code: def change_view(self, request, object_id, **kwargs):
          
          page = get_object_or_404(Page, pk=object_id)
          content_model = page.get_content_model()
  
          kwargs.setdefault("extra_context", {})
          kwargs["extra_context"].update({
              "hide_delete_link": not content_model.can_delete(request),
              "hide_slug_field": content_model.overridden(),
          })
  
          return super(PageAdmin, self).change_view(request, object_id, **kwargs)
docs: Enforce custom permissions for the page instance.