stable

Clone or download

Read-only

feat: disable PDF option menu

When there is no template defined, then instead of removing the entry menu, we disabled it and ask users to reach their administrator. That way it does not hide the feature (else user don't see it exists and won't search to print as PDF). Furthermore, when the user is anonymous, then no template information is send to the frontend and the entry is also disabled, so that users know that they must log in. Anonymous users are not supposed to know every bit of information of available templates since they can include sensitive information. If document is empty, or is in error, or sections are being loaded, or sections are only pending ones, then the option is not displayed at all. Took the opportunity to fix warning in console log by moving the printer-version component. Part of story #38630: Export to file Change-Id: Ie2930818d2485fa999745823d6118d49472c9ac3

Modified Files

Name
M plugins/artidoc/include/Artidoc/ArtidocController.php +1 −1 Go to diff View file
M plugins/artidoc/scripts/artidoc/po/fr_FR.po +9 −1 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/DocumentDropdown.test.ts +43 −9 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/DocumentDropdown.vue +11 −6 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/DocumentLayout.vue +0 −2 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/export/pdf/PdfExportMenuItem.test.ts +57 −0 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/export/pdf/PdfExportMenuItem.vue +27 −3 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/index.ts +2 −0 Go to diff View file
A plugins/artidoc/scripts/artidoc/src/is-user-anonymous.ts +22 −0 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/PdfTemplateForUserRetriever.php +41 −0 Go to diff View file
M plugins/pdftemplate/include/pdftemplatePlugin.php +3 −1 Go to diff View file
A plugins/pdftemplate/tests/unit/PdfTemplate/PdfTemplateForUserRetrieverTest.php +68 −0 Go to diff View file
M src/common/Export/Pdf/Template/GetPdfTemplatesEvent.php +1 −1 Go to diff View file