From d9b35c29cddba83ab0fb11e80bb48bbdcd7eb458 Mon Sep 17 00:00:00 2001 From: madhawap Date: Tue, 28 Jun 2016 15:04:04 +0530 Subject: [PATCH 1/2] swagger annotation fix to policy 'apply-changes' end point --- .../device/mgt/jaxrs/service/api/PolicyManagementService.java | 4 +++- 1 file changed, 3 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/api/PolicyManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java index 0dc31a49fb..9b63bd0e47 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/PolicyManagementService.java @@ -429,7 +429,9 @@ public interface PolicyManagementService { " the policy enforcement criteria . In a situation where you need to make changes to existing" + " policies (removing, activating, deactivating and updating) or add new policies, the existing" + " devices will not receive these changes immediately. Once all the required changes are made" + - " you need to apply the changes to push the policy changes to the existing devices.") + " you need to apply the changes to push the policy changes to the existing devices.", + tags = "Device Policy Management" + ) @ApiResponses( value = { @ApiResponse( From d34f29ab4637ddae5e83a1cfe7921abd1695ad23 Mon Sep 17 00:00:00 2001 From: dilanua Date: Tue, 28 Jun 2016 16:50:53 +0530 Subject: [PATCH 2/2] Fixing device types not retrieving issue --- .../mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java | 1 + .../src/main/webapp/META-INF/permissions.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index fe5088b204..62dca8864c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -322,6 +322,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { } @GET + @Path("/types") @Override public Response getDeviceTypes() { List deviceTypes; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/permissions.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/permissions.xml index 1e254bbce1..a92a3c184b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/permissions.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/webapp/META-INF/permissions.xml @@ -589,13 +589,13 @@ Deactivate Policy - /device-mgt/user/policies/add + /device-mgt/admin/policies/add /policies/deactivate-policy PUT Remove Policy - /device-mgt/user/policies/remove + /device-mgt/admin/policies/remove /policies/remove-policy POST