changeset 126:8b123c2adb69

now overriding /tools/find and /tools/labels only if the auth-service is providing user profile
author Alain Mazy <am@osimis.io>
date Fri, 20 Oct 2023 15:29:14 +0200
parents dce43cba6824
children 8591a0c1fa2a
files NEWS Plugin/Plugin.cpp
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Mon Sep 18 21:16:12 2023 +0200
+++ b/NEWS	Fri Oct 20 15:29:14 2023 +0200
@@ -1,3 +1,9 @@
+Pending changes in the mainline
+===============================
+
+* now overriding /tools/find and /tools/labels only if the auth-service
+  is providing user profiles ("WebServiceUserProfileUrl" has been configured).
+
 23-09-18 - v 0.6.0
 ==================
 
--- a/Plugin/Plugin.cpp	Mon Sep 18 21:16:12 2023 +0200
+++ b/Plugin/Plugin.cpp	Fri Oct 20 15:29:14 2023 +0200
@@ -1305,6 +1305,8 @@
         if (!urlUserProfile.empty())
         {
           OrthancPlugins::RegisterRestCallback<GetUserProfile>("/auth/user/profile", true);
+          OrthancPlugins::RegisterRestCallback<ToolsFind>("/tools/find", true);
+          OrthancPlugins::RegisterRestCallback<ToolsLabels>("/tools/labels", true);
         }
 
         if (!urlTokenCreationBase.empty())
@@ -1312,10 +1314,6 @@
           OrthancPlugins::RegisterRestCallback<CreateToken>("/auth/tokens/(.*)", true);
         }
 
-        OrthancPlugins::RegisterRestCallback<ToolsFind>("/tools/find", true);
-        OrthancPlugins::RegisterRestCallback<ToolsLabels>("/tools/labels", true);
-
-
         if (authorizationParser_.get() != NULL || permissionParser_.get() != NULL)
         {
           if (hasBasicAuthEnabled)