From 104bca0fb511a521d000f57ef46732cb6bd8d4d2 Mon Sep 17 00:00:00 2001 From: "tcdlpds@gmail.com" Date: Fri, 29 Jan 2021 19:34:58 +0530 Subject: [PATCH 1/2] Add FULLY_MANAGED and DEDICATED_DEVICE ownership types --- .../java/org/wso2/carbon/device/mgt/common/EnrolmentInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/EnrolmentInfo.java b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/EnrolmentInfo.java index 924c0aec85..24c9916066 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/EnrolmentInfo.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/src/main/java/org/wso2/carbon/device/mgt/common/EnrolmentInfo.java @@ -36,7 +36,7 @@ public class EnrolmentInfo implements Serializable { } public enum OwnerShip { - BYOD, COPE, WORK_PROFILE, GOOGLE_ENTERPRISE, COSU + BYOD, COPE, WORK_PROFILE, GOOGLE_ENTERPRISE, COSU, FULLY_MANAGED, DEDICATED_DEVICE } @ApiModelProperty(name = "id", value = "ID of the device in the WSO2 EMM device information database.", From 571d8afa115b5a2f409ac686c7c0e1842b1cccd0 Mon Sep 17 00:00:00 2001 From: "tcdlpds@gmail.com" Date: Fri, 29 Jan 2021 19:35:50 +0530 Subject: [PATCH 2/2] Fix app updating issues when the payload contains same app name --- .../application/mgt/core/impl/ApplicationManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java index 4f2d7bce65..b7b32ca34d 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/impl/ApplicationManagerImpl.java @@ -1969,7 +1969,8 @@ public class ApplicationManagerImpl implements ApplicationManager { ApplicationDTO applicationDTO = getApplication(applicationId); try { ConnectionManagerUtil.beginDBTransaction(); - if (!StringUtils.isEmpty(applicationUpdateWrapper.getName())){ + if (!StringUtils.isEmpty(applicationUpdateWrapper.getName()) && !applicationDTO.getName() + .equals(applicationUpdateWrapper.getName())) { if (applicationDAO .isExistingAppName(applicationUpdateWrapper.getName().trim(), applicationDTO.getDeviceTypeId(), tenantId)) {