Mercurial > hg > orthanc-authorization
changeset 237:855640287178 default tip
fix
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 26 May 2025 19:37:53 +0200 (11 days ago) |
parents | eb58d8793673 |
children | |
files | Plugin/Plugin.cpp |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugin/Plugin.cpp Mon May 26 18:53:20 2025 +0200 +++ b/Plugin/Plugin.cpp Mon May 26 19:37:53 2025 +0200 @@ -841,7 +841,7 @@ LOG(WARNING) << "Auth plugin: adding StudyInstanceUID constrains based on the resources/dicom-uid in the token."; // LOG(INFO) << joinedStudyInstanceUids; - query["StudyInstanceUID"] = joinedStudyInstanceUids; + query["Query"]["StudyInstanceUID"] = joinedStudyInstanceUids; Json::Value result; if (OrthancPlugins::RestApiPost(result, nativeUrl, query, false)) @@ -851,6 +851,10 @@ } } } + else + { + throw Orthanc::OrthancException(Orthanc::ErrorCode_ForbiddenAccess, "Auth plugin: unable to call tools/find when the user does not have access to any labels and if there is no StudyInstanceUID in the query and the auth-service does not implement /tokens/decode."); + } } // old code prior to 0.9.2: