mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
fixed ownership validation issue
This commit is contained in:
parent
25d3428355
commit
1bea33b259
@ -185,12 +185,18 @@ public class RequestValidationUtil {
|
|||||||
switch (ownership) {
|
switch (ownership) {
|
||||||
case "BYOD":
|
case "BYOD":
|
||||||
case "COPE":
|
case "COPE":
|
||||||
|
case "WORK_PROFILE":
|
||||||
|
case "GOOGLE_ENTERPRISE":
|
||||||
|
case "COSU":
|
||||||
|
case "FULLY_MANAGED":
|
||||||
|
case "DEDICATED_DEVICE":
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
throw new InputValidationException(
|
throw new InputValidationException(
|
||||||
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(
|
new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(
|
||||||
"Invalid ownership type received. " +
|
"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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user