mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
adding permissions for DM services
This commit is contained in:
parent
0b9c64594c
commit
1ffbb2183a
@ -42,17 +42,16 @@ public interface ActivityInfoProviderService {
|
||||
@ApiOperation(
|
||||
consumes = MediaType.APPLICATION_JSON,
|
||||
produces = MediaType.APPLICATION_JSON,
|
||||
httpMethod = "POST",
|
||||
httpMethod = "GET",
|
||||
value = "Retrieving the operation details.",
|
||||
notes = "This will return the operation details including the responses from the devices.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Activity details provided successfully."),
|
||||
@ApiResponse(code = 500, message = "Error occurred while fetching the activity for the supplied id.")
|
||||
})
|
||||
@Permission(scope = "operation-view", permissions = {"/permission/admin/device-mgt/admin/devices/view"})
|
||||
@Permission(scope = "activity-view", permissions = {"/permission/admin/device-mgt/admin/activities/view"})
|
||||
Response getActivity(
|
||||
@ApiParam(name = "id", value = "Activity id of the operation/activity to be retrieved.",
|
||||
required = true)
|
||||
@ApiParam(name = "id", value = "Activity id of the operation/activity to be retrieved.", required = true)
|
||||
@PathParam("id") String id);
|
||||
|
||||
}
|
||||
|
||||
@ -55,8 +55,8 @@ public interface DeviceManagementService {
|
||||
response = org.wso2.carbon.device.mgt.common.Device.class,
|
||||
responseContainer = "List")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Successfully fetched the list of devices.", response = org.wso2.carbon
|
||||
.device.mgt.common.Device.class, responseContainer = "List"),
|
||||
@ApiResponse(code = 200, message = "Successfully fetched the list of devices.",
|
||||
response = org.wso2.carbon.device.mgt.common.Device.class, responseContainer = "List"),
|
||||
@ApiResponse(code = 404, message = "No device has currently been under the provided type."),
|
||||
@ApiResponse(code = 500, message = "Error occurred while fetching the device list.")
|
||||
})
|
||||
@ -68,8 +68,14 @@ public interface DeviceManagementService {
|
||||
"index.", required = true)
|
||||
@QueryParam("limit") int limit);
|
||||
|
||||
Response getDevices(@HeaderParam("If-Modified-Since") Date timestamp, @QueryParam("offset") int offset,
|
||||
@QueryParam("limit") int limit);
|
||||
Response getDevices(
|
||||
@ApiParam(name = "If-Modified-Since", value = "Time since the device information changed.")
|
||||
@HeaderParam("If-Modified-Since") Date timestamp,
|
||||
@ApiParam(name = "offset", value = "Starting pagination index.",required = true)
|
||||
@QueryParam("offset") int offset,
|
||||
@ApiParam(name = "limit", value = "How many device details are required from the starting pagination " +
|
||||
"index.", required = true)
|
||||
@QueryParam("limit") int limit);
|
||||
|
||||
@GET
|
||||
@ApiOperation(
|
||||
|
||||
@ -29,7 +29,98 @@
|
||||
-->
|
||||
<PermissionConfiguration>
|
||||
<APIVersion></APIVersion>
|
||||
|
||||
<!-- Activity related APIs -->
|
||||
<Permission>
|
||||
<name>Fetch Activity related details</name>
|
||||
<path>/device-mgt/admin/activities/view</path>
|
||||
<url>/activities/*</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
<!-- Activity related APIs -->
|
||||
<!-- Device related APIs -->
|
||||
<Permission>
|
||||
<name>List devices</name>
|
||||
<path>/device-mgt/admin/devices/list</path>
|
||||
<url>/devices</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>List device types</name>
|
||||
<path>/device-mgt/admin/devices/list</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>List device types</name>
|
||||
<path>/device-mgt/user/devices/list</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Add policy</name>
|
||||
<path>/device-mgt/admin/policies/add</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Add User policy</name>
|
||||
<path>/device-mgt/user/policies/add</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Edit policy</name>
|
||||
<path>/device-mgt/admin/policies/update</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Edit User policy</name>
|
||||
<path>/device-mgt/user/policies/update</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>View device</name>
|
||||
<path>/device-mgt/admin/devices/view</path>
|
||||
<url>/devices/view</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>View user device</name>
|
||||
<path>/device-mgt/user/devices/view</path>
|
||||
<url>/devices/view</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Modify user device</name>
|
||||
<path>/device-mgt/user/devices/update</path>
|
||||
<url>/devices/type/*/id/*</url>
|
||||
<method>PUT</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Remove user device</name>
|
||||
<path>/device-mgt/user/devices/remove</path>
|
||||
<url>/devices/type/*/id/*</url>
|
||||
<method>DELETE</method>
|
||||
</Permission>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Permission>
|
||||
<name>Device Management</name>
|
||||
@ -143,82 +234,7 @@
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>List devices</name>
|
||||
<path>/device-mgt/admin/devices/list</path>
|
||||
<url>/devices</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>List device types</name>
|
||||
<path>/device-mgt/admin/devices/list</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>List device types</name>
|
||||
<path>/device-mgt/user/devices/list</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Add policy</name>
|
||||
<path>/device-mgt/admin/policies/add</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Add User policy</name>
|
||||
<path>/device-mgt/user/policies/add</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Edit policy</name>
|
||||
<path>/device-mgt/admin/policies/update</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Edit User policy</name>
|
||||
<path>/device-mgt/user/policies/update</path>
|
||||
<url>/devices/types</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>View device</name>
|
||||
<path>/device-mgt/admin/devices/view</path>
|
||||
<url>/devices/view</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>View user device</name>
|
||||
<path>/device-mgt/user/devices/view</path>
|
||||
<url>/devices/view</url>
|
||||
<method>GET</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Modify user device</name>
|
||||
<path>/device-mgt/user/devices/update</path>
|
||||
<url>/devices/type/*/id/*</url>
|
||||
<method>PUT</method>
|
||||
</Permission>
|
||||
|
||||
<Permission>
|
||||
<name>Remove user device</name>
|
||||
<path>/device-mgt/user/devices/remove</path>
|
||||
<url>/devices/type/*/id/*</url>
|
||||
<method>DELETE</method>
|
||||
</Permission>
|
||||
|
||||
<!--<Permission>-->
|
||||
<!--<name>Get device</name>-->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user