diff OrthancServer/Sources/OrthancWebDav.cpp @ 5856:d1dea8ad74a6 find-refactoring

implement StorageAccessOnFind for answers
author Alain Mazy <am@orthanc.team>
date Mon, 04 Nov 2024 21:51:24 +0100
parents ea547160f27e
children
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancWebDav.cpp	Mon Nov 04 20:00:42 2024 +0100
+++ b/OrthancServer/Sources/OrthancWebDav.cpp	Mon Nov 04 21:51:24 2024 +0100
@@ -937,7 +937,7 @@
 
       Visitor visitor(resources);
 
-      ResourceFinder finder(ResourceType_Study, ResponseContentFlags_ID);
+      ResourceFinder finder(ResourceType_Study, ResponseContentFlags_ID, GetContext().GetFindStorageAccessMode());
       finder.SetDatabaseLookup(query);
       finder.Execute(visitor, GetContext());
     }
@@ -1015,7 +1015,7 @@
 
       Visitor visitor;
 
-      ResourceFinder finder(ResourceType_Study, ResponseContentFlags_ID);
+      ResourceFinder finder(ResourceType_Study, ResponseContentFlags_ID, context_.GetFindStorageAccessMode());
       finder.SetDatabaseLookup(query);
       finder.Execute(visitor, context_);
 
@@ -1393,7 +1393,7 @@
         return false;
       }
 
-      ResourceFinder finder(level, ResponseContentFlags_ID);
+      ResourceFinder finder(level, ResponseContentFlags_ID, context_.GetFindStorageAccessMode());
       finder.SetDatabaseLookup(query);
       finder.SetRetrieveMetadata(true);
 
@@ -1444,7 +1444,7 @@
                              ResourceType level,
                              const DatabaseLookup& query)
   {
-    ResourceFinder finder(level, ResponseContentFlags_ExpandTrue);
+    ResourceFinder finder(level, ResponseContentFlags_ExpandTrue, context.GetFindStorageAccessMode());
     finder.SetDatabaseLookup(query);
 
     Json::Value expanded;
@@ -1514,7 +1514,7 @@
       
         mime = MimeType_Dicom;
 
-        ResourceFinder finder(ResourceType_Instance, ResponseContentFlags_ID);
+        ResourceFinder finder(ResourceType_Instance, ResponseContentFlags_ID, context_.GetFindStorageAccessMode());
         finder.SetDatabaseLookup(query);
         finder.SetRetrieveMetadata(true);
         finder.SetRetrieveAttachments(true);
@@ -1644,7 +1644,7 @@
 
         DicomDeleteVisitor visitor(context_, level);
 
-        ResourceFinder finder(level, ResponseContentFlags_ID);
+        ResourceFinder finder(level, ResponseContentFlags_ID, context_.GetFindStorageAccessMode());
         finder.SetDatabaseLookup(query);
         finder.Execute(visitor, context_);
         return true;