Mercurial > hg > orthanc-authorization
comparison Plugin/Plugin.cpp @ 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 | d5232d374fd8 |
children | f448e8626f1a |
comparison
equal
deleted
inserted
replaced
125:dce43cba6824 | 126:8b123c2adb69 |
---|---|
1303 } | 1303 } |
1304 | 1304 |
1305 if (!urlUserProfile.empty()) | 1305 if (!urlUserProfile.empty()) |
1306 { | 1306 { |
1307 OrthancPlugins::RegisterRestCallback<GetUserProfile>("/auth/user/profile", true); | 1307 OrthancPlugins::RegisterRestCallback<GetUserProfile>("/auth/user/profile", true); |
1308 OrthancPlugins::RegisterRestCallback<ToolsFind>("/tools/find", true); | |
1309 OrthancPlugins::RegisterRestCallback<ToolsLabels>("/tools/labels", true); | |
1308 } | 1310 } |
1309 | 1311 |
1310 if (!urlTokenCreationBase.empty()) | 1312 if (!urlTokenCreationBase.empty()) |
1311 { | 1313 { |
1312 OrthancPlugins::RegisterRestCallback<CreateToken>("/auth/tokens/(.*)", true); | 1314 OrthancPlugins::RegisterRestCallback<CreateToken>("/auth/tokens/(.*)", true); |
1313 } | 1315 } |
1314 | |
1315 OrthancPlugins::RegisterRestCallback<ToolsFind>("/tools/find", true); | |
1316 OrthancPlugins::RegisterRestCallback<ToolsLabels>("/tools/labels", true); | |
1317 | |
1318 | 1316 |
1319 if (authorizationParser_.get() != NULL || permissionParser_.get() != NULL) | 1317 if (authorizationParser_.get() != NULL || permissionParser_.get() != NULL) |
1320 { | 1318 { |
1321 if (hasBasicAuthEnabled) | 1319 if (hasBasicAuthEnabled) |
1322 { | 1320 { |