From c44c36cfe5c952732260a8c1005a3e90d5bb1992 Mon Sep 17 00:00:00 2001 From: j-dimension Date: Mon, 4 Nov 2024 14:40:54 +0100 Subject: [PATCH] fixed permissions issue for #1253 --- .../com/jdimension/jlawyer/export/HTMLExport.java | 2 +- .../jlawyer/services/ArchiveFileService.java | 14 ++++++++++++++ .../jlawyer/services/ArchiveFileServiceLocal.java | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/export/HTMLExport.java b/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/export/HTMLExport.java index e7073ad3..8ecad2be 100644 --- a/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/export/HTMLExport.java +++ b/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/export/HTMLExport.java @@ -927,7 +927,7 @@ public String export(ArchiveFileBean dto, Date lastModified) throws Exception { List hierarchy = new ArrayList<>(); if (db.getFolder() != null) { if(!folderHierarchies.containsKey(db.getFolder().getId())) { - hierarchy=caseFacade.getFolderHierarchy(db.getFolder().getId()); + hierarchy=caseFacade.getFolderHierarchyUnrestricted(db.getFolder().getId()); folderHierarchies.put(db.getFolder().getId(), hierarchy); } hierarchy=folderHierarchies.get(db.getFolder().getId()); diff --git a/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/ArchiveFileService.java b/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/ArchiveFileService.java index 130306ad..f99a18d5 100644 --- a/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/ArchiveFileService.java +++ b/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/ArchiveFileService.java @@ -4560,6 +4560,16 @@ public DocumentFolderTemplate getFolderTemplateById(String id) { return this.folderTemplateFacade.find(id); } + /** + * Returns a list of folder representing a hierarchy. First element in the list is the root folder. + * @param folderId + * @return + */ + @Override + public List getFolderHierarchyUnrestricted(String folderId) { + return getFolderHierarchyImpl(folderId); + } + /** * Returns a list of folder representing a hierarchy. First element in the list is the root folder. * @param folderId @@ -4568,6 +4578,10 @@ public DocumentFolderTemplate getFolderTemplateById(String id) { @Override @RolesAllowed({"loginRole"}) public List getFolderHierarchy(String folderId) { + return getFolderHierarchyImpl(folderId); + } + + private List getFolderHierarchyImpl(String folderId) { List hierarchy=new ArrayList<>(); if(folderId==null) return hierarchy; diff --git a/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/ArchiveFileServiceLocal.java b/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/ArchiveFileServiceLocal.java index e05723d7..25a4b673 100644 --- a/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/ArchiveFileServiceLocal.java +++ b/j-lawyer-server/j-lawyer-server-ejb/src/java/com/jdimension/jlawyer/services/ArchiveFileServiceLocal.java @@ -793,6 +793,7 @@ public interface ArchiveFileServiceLocal { DocumentFolderTemplate getFolderTemplateById(String id); List getFolderHierarchy(String folderId); + List getFolderHierarchyUnrestricted(String folderId); void purgeDocumentBin() throws Exception;