comparison 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
comparison
equal deleted inserted replaced
54:317b31e99501 56:c02f0646297d
71 if (authorizationParser_.get() != NULL && 71 if (authorizationParser_.get() != NULL &&
72 authorizationService_.get() != NULL) 72 authorizationService_.get() != NULL)
73 { 73 {
74 // Parse the resources that are accessed through this URI 74 // Parse the resources that are accessed through this URI
75 OrthancPlugins::IAuthorizationParser::AccessedResources accesses; 75 OrthancPlugins::IAuthorizationParser::AccessedResources accesses;
76 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) 76 std::map<std::string, std::string> getArguments;
77 for (uint32_t i = 0; i < getArgumentsCount; i++)
78 {
79 getArguments[getArgumentsKeys[i]] = getArgumentsValues[i];
80 }
81
82 if (!authorizationParser_->Parse(accesses, uri, getArguments))
77 { 83 {
78 return 0; // Unable to parse this URI 84 return 0; // Unable to parse this URI
79 } 85 }
80 86
81 // Loop over all the accessed resources to ensure access is 87 // Loop over all the accessed resources to ensure access is