diff Plugin/Plugin.cpp @ 56:c02f0646297d

added support for /dicom-web/studies?0020000D=1.2.3&...
author Alain Mazy <am@osimis.io>
date Tue, 08 Nov 2022 16:10:22 +0100
parents 317b31e99501
children 55539d564f4f
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Mon Sep 26 15:20:39 2022 +0200
+++ b/Plugin/Plugin.cpp	Tue Nov 08 16:10:22 2022 +0100
@@ -73,7 +73,13 @@
     {
       // Parse the resources that are accessed through this URI
       OrthancPlugins::IAuthorizationParser::AccessedResources accesses;
-      if (!authorizationParser_->Parse(accesses, uri))    // TODO: include getArguments (e.g. for StoneViewer call http://localhost:8044/dicom-web/studies?0020000D=1.2.276.0.7230010.3.1.2.2831156000.1.1499097860.742568&includefield=00081030)
+      std::map<std::string, std::string> getArguments;
+      for (uint32_t i = 0; i < getArgumentsCount; i++)
+      {
+        getArguments[getArgumentsKeys[i]] = getArgumentsValues[i];
+      }
+
+      if (!authorizationParser_->Parse(accesses, uri, getArguments))
       {
         return 0;  // Unable to parse this URI
       }