From 1721824d53cf649315fcd8fe555ee17ab977e7b4 Mon Sep 17 00:00:00 2001 From: Ace Date: Wed, 17 Oct 2018 16:49:29 +0530 Subject: [PATCH] Fixing issue where super tenant table space is querried instead of relavent tenant when retrieving geo location data --- .../mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java index a8811e5418..854972b833 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoLocationBasedServiceImpl.java @@ -97,7 +97,8 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService { // this is the user who initiates the request String authorizedUser = MultitenantUtils.getTenantAwareUsername( - CarbonContext.getThreadLocalCarbonContext().getUsername()); + CarbonContext.getThreadLocalCarbonContext().getUsername() + "@" + + CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); try { String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser);