diff OrthancServer/main.cpp @ 2872:9d08edde614b

Possibility to restrict the allowed DICOM commands for each modality
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 09 Oct 2018 14:19:48 +0200
parents 8aa6aef11b70
children 1153b1a128fe
line wrap: on
line diff
--- a/OrthancServer/main.cpp	Tue Oct 09 12:51:20 2018 +0200
+++ b/OrthancServer/main.cpp	Tue Oct 09 14:19:48 2018 +0200
@@ -212,13 +212,18 @@
       // Incoming C-Store requests are always accepted, even from unknown AET
       return true;
     }
-    else if (!Configuration::IsKnownAETitle(remoteAet, remoteIp))
-    {
-      return false;
-    }
     else
     {
-      return true;
+      RemoteModalityParameters modality;
+    
+      if (Configuration::LookupDicomModalityUsingAETitle(modality, remoteAet))
+      {
+        return modality.IsRequestAllowed(type);
+      }
+      else
+      {
+        return false;
+      }
     }
   }