changeset 152:9f686ee4b158

Added missing parsing of /dicom-web/studies/.../instances
author Alain Mazy <am@osimis.io>
date Fri, 15 Mar 2024 09:08:21 +0100
parents e7cee71a2f86
children 3683f3d083bd
files NEWS Plugin/DefaultAuthorizationParser.cpp Plugin/DefaultConfiguration.json UnitTestsSources/UnitTestsMain.cpp
diffstat 4 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Fri Feb 16 08:40:08 2024 +0100
+++ b/NEWS	Fri Mar 15 09:08:21 2024 +0100
@@ -1,3 +1,8 @@
+Pending changes in the mainline
+===============================
+
+* Added missing parsing of /dicom-web/studies/.../instances
+
 2024-02-16 - v 0.7.0
 ====================
 
--- a/Plugin/DefaultAuthorizationParser.cpp	Fri Feb 16 08:40:08 2024 +0100
+++ b/Plugin/DefaultAuthorizationParser.cpp	Fri Mar 15 09:08:21 2024 +0100
@@ -46,7 +46,7 @@
 
     // note: if you add new DICOMWeb routes here, add them in the DefaultConfiguration.json too
     dicomWebStudies_ = boost::regex(
-      "^" + tmp + "/studies/([.0-9]+)(|/series|/metadata)(|/)$");
+      "^" + tmp + "/studies/([.0-9]+)(|/series|/metadata|/instances)(|/)$");
       
     dicomWebSeries_ = boost::regex(
       "^" + tmp + "/studies/([.0-9]+)/series/([.0-9]+)(|/instances|/rendered|/metadata)(|/)$");
--- a/Plugin/DefaultConfiguration.json	Fri Feb 16 08:40:08 2024 +0100
+++ b/Plugin/DefaultConfiguration.json	Fri Mar 15 09:08:21 2024 +0100
@@ -39,7 +39,8 @@
         // "StandardConfigurations": [               // new in v 0.4.0
         //     "osimis-web-viewer",
         //     "stone-webviewer",
-        //     "orthanc-explorer-2"
+        //     "orthanc-explorer-2",
+        //     "ohif"
         // ],
 
         //"UncheckedResources" : [],
--- a/UnitTestsSources/UnitTestsMain.cpp	Fri Feb 16 08:40:08 2024 +0100
+++ b/UnitTestsSources/UnitTestsMain.cpp	Fri Mar 15 09:08:21 2024 +0100
@@ -196,12 +196,23 @@
   ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Patient, patientOrthancId));
 
   accesses.clear();
+  parser.Parse(accesses, "/dicom-web/studies/2.2/instances", noGetArguments.GetMap());
+  ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Study, studyOrthancId));
+  ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Patient, patientOrthancId));
+
+  accesses.clear();
   parser.Parse(accesses, "/dicom-web/studies/2.2/series/3.3", noGetArguments.GetMap());
   ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Series, seriesOrthancId));
   ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Study, studyOrthancId));
   ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Patient, patientOrthancId));
 
   accesses.clear();
+  parser.Parse(accesses, "/dicom-web/studies/2.2/series/3.3/instances", noGetArguments.GetMap());
+  ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Series, seriesOrthancId));
+  ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Study, studyOrthancId));
+  ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Patient, patientOrthancId));
+
+  accesses.clear();
   parser.Parse(accesses, "/dicom-web/studies/2.2/series/3.3/rendered", noGetArguments.GetMap());
   ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Series, seriesOrthancId));
   ASSERT_TRUE(IsAccessing(accesses, AccessLevel_Study, studyOrthancId));