From 58f8656e946010c2fec628f807e073aa29a0fa61 Mon Sep 17 00:00:00 2001 From: dilanua Date: Sat, 17 Sep 2016 17:22:47 +0530 Subject: [PATCH] Changing permissions - /devices/owning to /devices/owning-device --- .../api/ActivityInfoProviderService.java | 5 ++--- .../service/api/DeviceManagementService.java | 17 ++++++++--------- .../api/DeviceTypeManagementService.java | 3 +-- .../api/admin/DeviceManagementAdminService.java | 3 +-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java index 1c23be2544..d048ea75fd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/ActivityInfoProviderService.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.jaxrs.service.api; import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.Permission; -import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.device.mgt.common.operation.mgt.Activity; import org.wso2.carbon.device.mgt.jaxrs.beans.ActivityList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; @@ -93,7 +92,7 @@ public interface ActivityInfoProviderService { message = "Internal Server Error. \n Server error occurred while fetching activity data.", response = ErrorResponse.class) }) - @Permission(name = "View Activities", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Activities", permission = "/device-mgt/devices/owning-device/view") Response getActivity( @ApiParam( name = "id", @@ -154,7 +153,7 @@ public interface ActivityInfoProviderService { message = "Internal Server Error. \n Server error occurred while fetching activity data.", response = ErrorResponse.class) }) - @Permission(name = "View Activities", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Activities", permission = "/device-mgt/devices/owning-device/view") Response getActivities( @ApiParam( name = "since", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java index e1240f9dd4..b185bd368d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceManagementService.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.jaxrs.service.api; import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.Permission; -import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.Feature; import org.wso2.carbon.device.mgt.common.app.mgt.Application; @@ -93,7 +92,7 @@ public interface DeviceManagementService { message = "Internal Server Error. \n Server error occurred while fetching the device list.", response = ErrorResponse.class) }) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response getDevices( @ApiParam( name = "name", @@ -200,7 +199,7 @@ public interface DeviceManagementService { "Server error occurred while retrieving information requested device.", response = ErrorResponse.class) }) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response getDevice( @ApiParam( name = "type", @@ -282,7 +281,7 @@ public interface DeviceManagementService { "Server error occurred while retrieving feature list of the device.", response = ErrorResponse.class) }) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response getFeaturesOfDevice( @ApiParam( name = "type", @@ -358,7 +357,7 @@ public interface DeviceManagementService { "Server error occurred while enrolling the device.", response = ErrorResponse.class) }) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response searchDevices( @ApiParam( name = "offset", @@ -437,7 +436,7 @@ public interface DeviceManagementService { "Server error occurred while retrieving installed application list of the device.", response = ErrorResponse.class) }) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response getInstalledApplications( @ApiParam( name = "type", @@ -533,7 +532,7 @@ public interface DeviceManagementService { "Server error occurred while retrieving operation list scheduled for the device.", response = ErrorResponse.class) }) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response getDeviceOperations( @ApiParam( name = "type", @@ -631,7 +630,7 @@ public interface DeviceManagementService { response = ErrorResponse.class) } ) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response getEffectivePolicyOfDevice( @ApiParam( name = "type", @@ -683,7 +682,7 @@ public interface DeviceManagementService { response = ErrorResponse.class) } ) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response getComplianceDataOfDevice( @ApiParam( name = "type", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java index b9a24fbafe..79fbf42489 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/DeviceTypeManagementService.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.jaxrs.service.api; import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.Permission; -import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.device.mgt.jaxrs.beans.DeviceTypeList; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; @@ -79,7 +78,7 @@ public interface DeviceTypeManagementService { response = ErrorResponse.class) } ) - @Permission(name = "View Device Types", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Device Types", permission = "/device-mgt/devices/owning-device/view") Response getDeviceTypes( @ApiParam( name = "If-Modified-Since", diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java index e673260659..1f4e059375 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/api/admin/DeviceManagementAdminService.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.jaxrs.service.api.admin; import io.swagger.annotations.*; import org.wso2.carbon.apimgt.annotations.api.API; import org.wso2.carbon.apimgt.annotations.api.Permission; -import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; @@ -86,7 +85,7 @@ public interface DeviceManagementAdminService { message = "Internal Server Error. \n Server error occurred while fetching the device list.", response = ErrorResponse.class) }) - @Permission(name = "View Devices", permission = "/device-mgt/devices/owning/view") + @Permission(name = "View Devices", permission = "/device-mgt/devices/owning-device/view") Response getDevicesByName( @ApiParam( name = "name",