Mercurial > hg > orthanc-authorization
changeset 203:ae7a37e320e7
don't throw if WebServiceSettingsRolesUrl is not defined
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Fri, 20 Dec 2024 16:38:10 +0100 |
parents | 3c56c3f0059a |
children | 0046467cff54 |
files | NEWS Plugin/AuthorizationWebService.cpp Plugin/DefaultConfiguration.json |
diffstat | 3 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Mon Sep 23 12:43:33 2024 +0200 +++ b/NEWS Fri Dec 20 16:38:10 2024 +0100 @@ -2,6 +2,7 @@ =============================== * Fix forbidden access when the PatientID and StudyInstanceUID are identical. +* Fix an error when WebServiceSettingsRolesUrl is not defined. 2024-07-03 - v 0.8.1
--- a/Plugin/AuthorizationWebService.cpp Mon Sep 23 12:43:33 2024 +0200 +++ b/Plugin/AuthorizationWebService.cpp Fri Dec 20 16:38:10 2024 +0100 @@ -456,7 +456,8 @@ { if (settingsRolesUrl_.empty()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_BadRequest, "Can not get settings-roles if the 'WebServiceSettingsRolesUrl' is not configured"); + LOG(INFO) << "Can not get settings-roles if the 'WebServiceSettingsRolesUrl' is not configured"; + return false; } Orthanc::WebServiceParameters authWebservice;
--- a/Plugin/DefaultConfiguration.json Mon Sep 23 12:43:33 2024 +0200 +++ b/Plugin/DefaultConfiguration.json Fri Dec 20 16:38:10 2024 +0100 @@ -22,6 +22,9 @@ // The URL of the auth webservice route implementing token decoding (optional) // "WebServiceTokenDecoderUrl": "http://change-me:8000/tokens/decode" + // The URL of the auth webservice route implementing roles assignements (optional) + // "WebServiceSettingsRolesUrl": "http://change-me:8000/settings/roles" + // The username and password to connect to the webservice (optional) //"WebServiceUsername": "change-me", //"WebServicePassword": "change-me",