We user several plugins that export the current entry via buttons in the Admin CP. One plugin exports the entry as a PDF and another downloads it as HTML along with its assets in a zip.
I need to add {% requireLogin %}
so that the entries are no longer public and require users to be authenticated to view.
However, I'm finding that plugins don't appear to have the current users authentication status and capture the login page. For example, the PDF plugin downloads a PDF of the login page and the HTML Page exporter plugin exports the HTML of the login page as well.
Is there away to prevent public access to the world, but still allow plugins to capture the pages as if they were authenticated?
Currently running Craft 3.7.44 on php 8.