From a6728bfaec0dd3dc71274b790996fc5a4bb240f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Thu, 5 Sep 2024 11:37:21 +0200 Subject: [PATCH] feature/new props for user invitation base URL --- obp-api/src/main/resources/props/sample.props.template | 5 +++++ obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/obp-api/src/main/resources/props/sample.props.template b/obp-api/src/main/resources/props/sample.props.template index a9a3fd1cdd..5b1810460d 100644 --- a/obp-api/src/main/resources/props/sample.props.template +++ b/obp-api/src/main/resources/props/sample.props.template @@ -1180,6 +1180,11 @@ personal_data_collection_consent_country_waiver_list = Austria, Belgium, Bulgari # local_identity_provider=strongly recommended to use top level domain name so that all nodes in the cluster share same provider name +# User Invitation Link Base URL +# it defaults to the "portal_hostname" as a 1st choise and to the "hostname" props value as a 2nd choise +# user_invitation_link_base_URL=strongly recommended to use top level domain name so that all nodes in the cluster share same URL + + # enable dynamic code sandbox, default is false, this will make sandbox works for code running in Future, will make performance lower than disable dynamic_code_sandbox_enable=false # Here is the default permissions if you set the dynamic_code_sandbox_enable = true. If you need more permission need to add it manually here. diff --git a/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala b/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala index 56f25e11a9..fcf804f28d 100644 --- a/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala +++ b/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala @@ -3822,7 +3822,7 @@ trait APIMethods400 extends MdcLoggable { postedData.purpose, cc.callContext) } yield { - val link = s"${APIUtil.getPropsValue("portal_hostname", Constant.HostName)}/user-invitation?id=${invitation.secretKey}" + val link = s"${APIUtil.getPropsValue("user_invitation_link_base_URL", APIUtil.getPropsValue("portal_hostname", Constant.HostName))}/user-invitation?id=${invitation.secretKey}" if (postedData.purpose == UserInvitationPurpose.DEVELOPER.toString){ val subject = getWebUiPropsValue("webui_developer_user_invitation_email_subject", "Welcome to the API Playground") val from = getWebUiPropsValue("webui_developer_user_invitation_email_from", "do-not-reply@openbankproject.com")