mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Refactored scopes
This commit is contained in:
parent
ac75ff1d71
commit
fe28bc25f1
@ -91,7 +91,7 @@ public interface ActivityInfoProviderService {
|
||||
message = "Internal Server Error. \n Server error occurred while fetching activity data.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "activity-view", roles = {"emm-user", "emm-admin"})
|
||||
@Permission(scope = "activity:view", roles = {"admin"})
|
||||
Response getActivity(
|
||||
@ApiParam(
|
||||
name = "id",
|
||||
@ -150,7 +150,7 @@ public interface ActivityInfoProviderService {
|
||||
message = "Internal Server Error. \n Server error occurred while fetching activity data.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "activity-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "activity:view", roles = {"admin"})
|
||||
Response getActivities(
|
||||
@ApiParam(
|
||||
name = "since",
|
||||
|
||||
@ -81,7 +81,7 @@ public interface ConfigurationManagementService {
|
||||
"platform configuration.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "configuration-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "configuration:view", roles = {"admin"})
|
||||
Response getConfiguration(
|
||||
@ApiParam(
|
||||
name = "If-Modified-Since",
|
||||
@ -127,7 +127,7 @@ public interface ConfigurationManagementService {
|
||||
"Server error occurred while modifying general platform configuration.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "configuration-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "configuration:modify", roles = {"admin"})
|
||||
Response updateConfiguration(
|
||||
@ApiParam(
|
||||
name = "configuration",
|
||||
|
||||
@ -90,7 +90,7 @@ public interface DeviceManagementService {
|
||||
message = "Internal Server Error. \n Server error occurred while fetching the device list.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "device-list", roles = {"emm-admin"})
|
||||
@Permission(scope = "device:list", roles = {"admin"})
|
||||
Response getDevices(
|
||||
@ApiParam(
|
||||
name = "type",
|
||||
@ -194,7 +194,7 @@ public interface DeviceManagementService {
|
||||
"Server error occurred while retrieving information requested device.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "device-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "device:view", roles = {"admin"})
|
||||
Response getDevice(
|
||||
@ApiParam(
|
||||
name = "type",
|
||||
@ -274,7 +274,7 @@ public interface DeviceManagementService {
|
||||
"Server error occurred while retrieving feature list of the device.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "device-search", roles = {"emm-admin"})
|
||||
@Permission(scope = "device:view", roles = {"admin"})
|
||||
Response getFeaturesOfDevice(
|
||||
@ApiParam(
|
||||
name = "type",
|
||||
@ -348,7 +348,7 @@ public interface DeviceManagementService {
|
||||
"Server error occurred while enrolling the device.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "device-search", roles = {"emm-admin" })
|
||||
@Permission(scope = "device:search", roles = {"admin" })
|
||||
Response searchDevices(
|
||||
@ApiParam(
|
||||
name = "offset",
|
||||
@ -427,7 +427,7 @@ public interface DeviceManagementService {
|
||||
"Server error occurred while retrieving installed application list of the device.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "operation-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "device:view", roles = {"admin"})
|
||||
Response getInstalledApplications(
|
||||
@ApiParam(
|
||||
name = "type",
|
||||
@ -521,7 +521,7 @@ public interface DeviceManagementService {
|
||||
"Server error occurred while retrieving operation list scheduled for the device.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "operation-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "device:view", roles = {"admin"})
|
||||
Response getDeviceOperations(
|
||||
@ApiParam(
|
||||
name = "type",
|
||||
@ -617,7 +617,7 @@ public interface DeviceManagementService {
|
||||
response = ErrorResponse.class)
|
||||
}
|
||||
)
|
||||
@Permission(scope = "operation-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "device:view", roles = {"admin"})
|
||||
Response getEffectivePolicyOfDevice(
|
||||
@ApiParam(
|
||||
name = "type",
|
||||
@ -639,25 +639,4 @@ public interface DeviceManagementService {
|
||||
@HeaderParam("If-Modified-Since")
|
||||
String ifModifiedSince);
|
||||
|
||||
@GET
|
||||
@Path("/types")
|
||||
@ApiOperation(
|
||||
produces = MediaType.APPLICATION_JSON,
|
||||
httpMethod = "GET",
|
||||
value = "Get the device type.",
|
||||
notes = "You are able to register Android, iOS and Windows devices with WSO2 EMM. In order to"
|
||||
+ "retrieve the device type details that are registered this end-point van be used.",
|
||||
tags = "Device Management")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
code = 200,
|
||||
message = "OK. \n Registered device types have successfully retrieved"),
|
||||
@ApiResponse(
|
||||
code = 500,
|
||||
message = "Error occurred while fetching the list of device types.")
|
||||
}
|
||||
)
|
||||
@Permission(scope = "operation-view", roles = {"emm-admin"})
|
||||
Response getDeviceTypes();
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ public interface NotificationManagementService {
|
||||
"\n Server error occurred while fetching the notification list.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "device-notification-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "notification:view", roles = {"admin"})
|
||||
Response getNotifications(
|
||||
@ApiParam(
|
||||
name = "status",
|
||||
|
||||
@ -99,7 +99,7 @@ public interface PolicyManagementService {
|
||||
"Server error occurred while adding a new policy.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:add", roles = {"admin"})
|
||||
Response addPolicy(
|
||||
@ApiParam(
|
||||
name = "policy",
|
||||
@ -153,7 +153,7 @@ public interface PolicyManagementService {
|
||||
"policies."),
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:list", roles = {"admin"})
|
||||
Response getPolicies(
|
||||
@ApiParam(
|
||||
name = "If-Modified-Since",
|
||||
@ -219,7 +219,7 @@ public interface PolicyManagementService {
|
||||
"policy.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:view", roles = {"admin"})
|
||||
Response getPolicy(
|
||||
@ApiParam(
|
||||
name = "id",
|
||||
@ -283,7 +283,7 @@ public interface PolicyManagementService {
|
||||
"Server error occurred while updating the policy.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:modify", roles = {"admin"})
|
||||
Response updatePolicy(
|
||||
@ApiParam(
|
||||
name = "id",
|
||||
@ -329,7 +329,7 @@ public interface PolicyManagementService {
|
||||
"Server error occurred while bulk removing policies.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:modify", roles = {"admin"})
|
||||
Response removePolicies(
|
||||
@ApiParam(
|
||||
name = "policyIds",
|
||||
@ -365,7 +365,7 @@ public interface PolicyManagementService {
|
||||
message = "ErrorResponse in activating policies.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:add", roles = {"admin"})
|
||||
Response activatePolicies(
|
||||
@ApiParam(
|
||||
name = "policyIds",
|
||||
@ -401,7 +401,7 @@ public interface PolicyManagementService {
|
||||
message = "ErrorResponse in deactivating policies.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:add", roles = {"admin"})
|
||||
Response deactivatePolicies(
|
||||
@ApiParam(
|
||||
name = "policyIds",
|
||||
@ -434,7 +434,7 @@ public interface PolicyManagementService {
|
||||
message = "ErrorResponse in deactivating policies.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:add", roles = {"admin"})
|
||||
Response applyChanges();
|
||||
|
||||
|
||||
@ -463,7 +463,7 @@ public interface PolicyManagementService {
|
||||
message = "Exception in updating policy priorities.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "policy-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "policy:add", roles = {"admin"})
|
||||
Response updatePolicyPriorities(
|
||||
@ApiParam(
|
||||
name = "priorityUpdatedPolicies",
|
||||
|
||||
@ -77,7 +77,7 @@ public interface RoleManagementService {
|
||||
message = "Internal Server Error. \n Server error occurred while fetching requested list of roles.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "roles-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "roles:list", roles = {"admin"})
|
||||
Response getRoles(
|
||||
@ApiParam(
|
||||
name = "filter",
|
||||
@ -159,7 +159,7 @@ public interface RoleManagementService {
|
||||
message = "Internal Server ErrorResponse. \n Server error occurred while fetching the permission list of the requested role.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "roles-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "roles:view", roles = {"admin"})
|
||||
Response getPermissionsOfRole(
|
||||
@ApiParam(
|
||||
name = "roleName",
|
||||
@ -222,7 +222,7 @@ public interface RoleManagementService {
|
||||
"requested role.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "roles-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "roles:view", roles = {"admin"})
|
||||
Response getRole(
|
||||
@ApiParam(
|
||||
name = "roleName",
|
||||
@ -282,7 +282,7 @@ public interface RoleManagementService {
|
||||
message = "Internal Server Error. \n Server error occurred while adding a new role.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "roles-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "roles:add", roles = {"admin"})
|
||||
Response addRole(
|
||||
@ApiParam(
|
||||
name = "role",
|
||||
@ -332,7 +332,7 @@ public interface RoleManagementService {
|
||||
message = "Internal Server Error. \n Server error occurred while updating the role.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "roles-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "roles:modify", roles = {"admin"})
|
||||
Response updateRole(
|
||||
@ApiParam(
|
||||
name = "roleName",
|
||||
@ -369,7 +369,7 @@ public interface RoleManagementService {
|
||||
message = "Internal Server Error. \n Server error occurred while removing the role.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "roles-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "roles:modify", roles = {"admin"})
|
||||
Response deleteRole(
|
||||
@ApiParam(
|
||||
name = "roleName",
|
||||
@ -427,7 +427,7 @@ public interface RoleManagementService {
|
||||
"Server error occurred while updating the user list of the role.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "roles-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "roles:modify", roles = {"admin"})
|
||||
Response updateUsersOfRole(
|
||||
@ApiParam(
|
||||
name = "roleName",
|
||||
|
||||
@ -74,7 +74,7 @@ public interface ApplicationManagementAdminService {
|
||||
"a given set of devices.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "application-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "application:install", roles = {"admin"})
|
||||
Response installApplication(
|
||||
@ApiParam(
|
||||
name = "applicationWrapper",
|
||||
@ -113,7 +113,7 @@ public interface ApplicationManagementAdminService {
|
||||
"a given set of devices.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "application-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "application:uninstall", roles = {"admin"})
|
||||
Response uninstallApplication(
|
||||
@ApiParam(
|
||||
name = "applicationWrapper",
|
||||
|
||||
@ -84,7 +84,7 @@ public interface DeviceManagementAdminService {
|
||||
message = "Internal Server Error. \n Server error occurred while fetching the device list.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "device-view", roles = {"emm-admin"})
|
||||
@Permission(scope = "device:view", roles = {"admin"})
|
||||
Response getDevicesByName(
|
||||
@ApiParam(
|
||||
name = "name",
|
||||
|
||||
@ -67,7 +67,7 @@ public interface UserManagementAdminService {
|
||||
"Server error occurred while updating credentials of the user.",
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Permission(scope = "user-modify", roles = {"emm-admin"})
|
||||
@Permission(scope = "user:modify", roles = {"admin"})
|
||||
Response resetUserPassword(
|
||||
@ApiParam(
|
||||
name = "username",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user