From af25528a8bbd3b5434d8bdcca156be85b445e9b7 Mon Sep 17 00:00:00 2001 From: Mohamed Rashd Date: Fri, 10 Jun 2022 14:48:16 +0530 Subject: [PATCH] Delete custom whitelabel favicon and logo on whitelabel reset --- .../mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java index 2af7aa361fc..cb46ec25d3b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/metadata/mgt/WhiteLabelManagementServiceImpl.java @@ -154,9 +154,11 @@ public class WhiteLabelManagementServiceImpl implements WhiteLabelManagementServ @Override public void resetToDefaultWhiteLabelTheme() throws MetadataManagementException { + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true); WhiteLabelTheme whiteLabelTheme = getDefaultWhiteLabelTheme(); Metadata metadata = constructWhiteLabelThemeMetadata(whiteLabelTheme); DeviceManagementDataHolder.getInstance().getMetadataManagementService().updateMetadata(metadata); + WhiteLabelStorageUtil.deleteWhiteLabelImageForTenantIfExists(tenantId); } /**