fix: Paperless-PDF auch für den Duplikatvergleich im Mail-Import
Build and Push Multi-Platform Images / build-and-push (push) Successful in 34s

DuplikatVergleichModal lädt das vorhandene Paperless-Dokument über
documents/:id/pdf – auch im Mail-Import (VIEW_MAIL). Die Route verlangte
nur VIEW_INBOX/VIEW_SCANNER, reine Mail-Nutzer bekamen 403.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bjoernpoettkerandClaude Opus 5.5 committed 2026-11-04 10:48:01 +01:00
1 parent fe338271bf
commit d37e02e157
1 file changed
+8 -4
@@ -276,12 +276,16 @@ export class PaperlessController {
}
/**
* Original-PDF – für den Bearbeiten-Dialog und den Duplikatvergleich im
* Scanner (dort ein beliebiges vorhandenes Dokument), deshalb ohne Prüfung
* pro Dokument.
* Original-PDF – für den Bearbeiten-Dialog und den Duplikatvergleich in
* Scanner und Mail-Import (dort ein beliebiges vorhandenes Dokument),
* deshalb ohne Prüfung pro Dokument.
*/
@Get('documents/:id/pdf')
@RequirePermissions(Permission.VIEW_INBOX, Permission.VIEW_SCANNER)
@RequirePermissions(
Permission.VIEW_INBOX,
Permission.VIEW_SCANNER,
Permission.VIEW_MAIL,
)
async getDocumentPdf(@Param('id') id: string, @Res() res: Response) {
try {
const stream = await this.paperlessService.getDocumentPdfStream(