mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Wipe when unenroll
This commit is contained in:
parent
b0f7cfdf61
commit
ea73040e65
@ -125,6 +125,12 @@ if (!user || accessToken == null) {
|
|||||||
session.put("externalEndpoint", restAPIRequestDetails["endpoint"]);
|
session.put("externalEndpoint", restAPIRequestDetails["endpoint"]);
|
||||||
session.put("externalToken", restAPIRequestDetails["externalToken"]);
|
session.put("externalToken", restAPIRequestDetails["externalToken"]);
|
||||||
callBackend(restAPIRequestDetails["endpoint"], session.get("externalToken"), "GET", restAPIRequestDetails);
|
callBackend(restAPIRequestDetails["endpoint"], session.get("externalToken"), "GET", restAPIRequestDetails);
|
||||||
|
log.info("Calling unenroll");
|
||||||
|
if (response["status"] == 200) {
|
||||||
|
log.info("Unenroll success, wiping devices.");
|
||||||
|
var wipeURL = devicemgtProps["httpsURL"] + "/api/device-mgt/android/v1.0/enterprise/wipe-device"
|
||||||
|
callBackend(wipeURL, accessToken, "GET");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -162,7 +162,9 @@
|
|||||||
"perm:geo-service:analytics-view",
|
"perm:geo-service:analytics-view",
|
||||||
"perm:geo-service:alerts-manage",
|
"perm:geo-service:alerts-manage",
|
||||||
"perm:devices:permanent-delete",
|
"perm:devices:permanent-delete",
|
||||||
"appm:read"
|
"appm:read",
|
||||||
|
"perm:enterprise:modify",
|
||||||
|
"perm:enterprise:view"
|
||||||
],
|
],
|
||||||
"isOAuthEnabled": true,
|
"isOAuthEnabled": true,
|
||||||
"backendRestEndpoints": {
|
"backendRestEndpoints": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user