From 3ff1f23a8086bb6f0a84f72e7272c371f1e98021 Mon Sep 17 00:00:00 2001 From: ThilinaPremachandra Date: Thu, 15 Dec 2022 03:15:44 +0530 Subject: [PATCH] fixed devices ownership validation issue --- .../jaxrs/service/impl/util/RequestValidationUtil.java | 8 +++++++- 1 file changed, 7 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/util/RequestValidationUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java index b41d39158b..f62d3f7fcf 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java @@ -185,12 +185,18 @@ public class RequestValidationUtil { switch (ownership) { case "BYOD": case "COPE": + case "WORK_PROFILE": + case "GOOGLE_ENTERPRISE": + case "COSU": + case "FULLY_MANAGED": + case "DEDICATED_DEVICE": return; default: throw new InputValidationException( new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage( "Invalid ownership type received. " + - "Valid ownership types are BYOD | COPE").build()); + "Valid ownership types are BYOD | COPE | WORK_PROFILE | GOOGLE_ENTERPRISE | " + + "COSU | FULLY_MANAGED | DEDICATED_DEVICE ").build()); } }