Mercurial > hg > orthanc-authorization
changeset 217:380ac7bda84e
back to mainline
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Thu, 27 Feb 2025 12:47:43 +0100 (2 months ago) |
parents | 56aef13ad10c (current diff) 993653b3f265 (diff) |
children | 24199565c7e6 |
files | CMakeLists.txt |
diffstat | 2 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Wed Feb 26 10:28:05 2025 +0100 +++ b/NEWS Thu Feb 27 12:47:43 2025 +0100 @@ -1,5 +1,5 @@ -Pending changes in the mainline -=============================== +2025-02-27 - v 0.9.0 +==================== * The plugin now filters out all unauthorized labels from the "Labels" fields in the responses of these API routes:
--- a/Plugin/Plugin.cpp Wed Feb 26 10:28:05 2025 +0100 +++ b/Plugin/Plugin.cpp Thu Feb 27 12:47:43 2025 +0100 @@ -731,7 +731,8 @@ void ToolsFindOrCountResources(OrthancPluginRestOutput* output, const char* /*url*/, const OrthancPluginHttpRequest* request, - const char* nativeUrl) + const char* nativeUrl, + bool filterLabelsInResponse) { OrthancPluginContext* context = OrthancPlugins::GetGlobalContext(); @@ -837,7 +838,10 @@ if (OrthancPlugins::RestApiPost(result, nativeUrl, query, false)) { - FilterLabelsInResourceArray(result, profile); + if (filterLabelsInResponse) + { + FilterLabelsInResourceArray(result, profile); + } OrthancPlugins::AnswerJson(result, output); } @@ -862,14 +866,14 @@ const char* url, const OrthancPluginHttpRequest* request) { - ToolsFindOrCountResources(output, url, request, "/tools/find"); + ToolsFindOrCountResources(output, url, request, "/tools/find", true); } void ToolsCountResources(OrthancPluginRestOutput* output, const char* url, const OrthancPluginHttpRequest* request) { - ToolsFindOrCountResources(output, url, request, "/tools/count-resources"); + ToolsFindOrCountResources(output, url, request, "/tools/count-resources", false); } void ToolsLabels(OrthancPluginRestOutput* output,