Merge pull request #1266 from ruwany/master

Fixing issue with retrieving tenant aware username when retrieving geo location info
4.x.x
Geeth 6 years ago committed by GitHub
commit 866ca72416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -100,7 +100,7 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
CarbonContext.getThreadLocalCarbonContext().getUsername()); CarbonContext.getThreadLocalCarbonContext().getUsername());
try { try {
String tenantDomain = MultitenantUtils.getTenantDomain(authorizedUser); String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain();
int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain); int tenantId = DeviceMgtAPIUtils.getRealmService().getTenantManager().getTenantId(tenantDomain);
AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI(); AnalyticsDataAPI analyticsDataAPI = DeviceMgtAPIUtils.getAnalyticsDataAPI();
List<SearchResultEntry> searchResults = analyticsDataAPI.search(tenantId, tableName, query, List<SearchResultEntry> searchResults = analyticsDataAPI.search(tenantId, tableName, query,

Loading…
Cancel
Save