From dc2bdba7400c29ae242761fb0b135eed7cd570c3 Mon Sep 17 00:00:00 2001 From: Tobias Bischoff Date: Thu, 18 Oct 2018 10:24:14 +0200 Subject: [PATCH] Allows to set the base url per tenant instead of only once per product Backend users of the tenant should not always the the product url but their own url - Fixes: SE-4956 --- src/main/java/sirius/biz/web/BizController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/sirius/biz/web/BizController.java b/src/main/java/sirius/biz/web/BizController.java index 502b81f3c..ad721e8ef 100644 --- a/src/main/java/sirius/biz/web/BizController.java +++ b/src/main/java/sirius/biz/web/BizController.java @@ -141,6 +141,11 @@ protected String getBaseUrl() { LOG.WARN("product.baseUrl is not filled. Please update the system configuration!"); } } + + if (UserContext.getSettings().getConfig().hasPath("tenant.baseUrl")) { + return UserContext.getSettings().get("tenant.baseUrl").asString(); + } + return baseUrl; }