|
|
@ -45,8 +45,9 @@ public interface RoleManagementService {
|
|
|
|
produces = MediaType.APPLICATION_JSON,
|
|
|
|
produces = MediaType.APPLICATION_JSON,
|
|
|
|
httpMethod = "GET",
|
|
|
|
httpMethod = "GET",
|
|
|
|
value = "Get the list of roles.",
|
|
|
|
value = "Get the list of roles.",
|
|
|
|
notes = "If you wish to get the details of all the roles in EMM, you can do so using this REST API. All " +
|
|
|
|
notes = "If you wish to get the details of all the roles in EMM, you can do so using this REST "
|
|
|
|
"internal roles, roles created for Service-providers and application related roles are omitted.",
|
|
|
|
+ "API. All internal roles, roles created for Service-providers and application related "
|
|
|
|
|
|
|
|
+ "roles are omitted.",
|
|
|
|
tags = "Role Management")
|
|
|
|
tags = "Role Management")
|
|
|
|
@ApiResponses(
|
|
|
|
@ApiResponses(
|
|
|
|
value = {
|
|
|
|
value = {
|
|
|
@ -64,12 +65,15 @@ public interface RoleManagementService {
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(
|
|
|
|
name = "Last-Modified",
|
|
|
|
name = "Last-Modified",
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
description = "Date and time the resource has been modified the"
|
|
|
|
|
|
|
|
+ " last time.\n" +
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
}),
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 304,
|
|
|
|
code = 304,
|
|
|
|
message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."),
|
|
|
|
message = "Not Modified. \n Empty body because the client has already the latest "
|
|
|
|
|
|
|
|
+ "version of the requested resource."),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 404,
|
|
|
|
code = 404,
|
|
|
|
message = "Not Found. \n Resource does not exist.",
|
|
|
|
message = "Not Found. \n Resource does not exist.",
|
|
|
@ -81,38 +85,47 @@ public interface RoleManagementService {
|
|
|
|
code = 500,
|
|
|
|
code = 500,
|
|
|
|
message = "Internal Server ErrorResponse. \n Server error occurred while fetching requested list of roles.",
|
|
|
|
message = "Internal Server ErrorResponse. \n Server error occurred while fetching requested list of roles.",
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
@Permission(scope = "roles-view", permissions = {
|
|
|
|
)
|
|
|
|
|
|
|
|
@Permission(
|
|
|
|
|
|
|
|
scope = "roles-view",
|
|
|
|
|
|
|
|
permissions = {
|
|
|
|
"/permission/admin/device-mgt/admin/roles/list",
|
|
|
|
"/permission/admin/device-mgt/admin/roles/list",
|
|
|
|
"/permission/admin/device-mgt/admin/users/view",
|
|
|
|
"/permission/admin/device-mgt/admin/users/view",
|
|
|
|
"/permission/admin/device-mgt/admin/policies/add",
|
|
|
|
"/permission/admin/device-mgt/admin/policies/add",
|
|
|
|
"/permission/admin/device-mgt/admin/policies/update"})
|
|
|
|
"/permission/admin/device-mgt/admin/policies/update"}
|
|
|
|
|
|
|
|
)
|
|
|
|
Response getRoles(
|
|
|
|
Response getRoles(
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "filter",
|
|
|
|
name = "filter",
|
|
|
|
value = "Role name or a part of it to search.",
|
|
|
|
value = "Role name or a part of it to search.",
|
|
|
|
required = false)
|
|
|
|
required = false)
|
|
|
|
@QueryParam("filter") String filter,
|
|
|
|
@QueryParam("filter")
|
|
|
|
|
|
|
|
String filter,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "user-store",
|
|
|
|
name = "user-store",
|
|
|
|
value = "From which user store the roles must be fetched.",
|
|
|
|
value = "From which user store the roles must be fetched.",
|
|
|
|
required = false)
|
|
|
|
required = false)
|
|
|
|
@QueryParam("user-store") String userStoreName,
|
|
|
|
@QueryParam("user-store")
|
|
|
|
|
|
|
|
String userStoreName,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "If-Modified-Since",
|
|
|
|
name = "If-Modified-Since",
|
|
|
|
value = "Validates if the requested variant has not been modified since the time specified",
|
|
|
|
value = "Validates if the requested variant has not been modified since the time specified",
|
|
|
|
required = false)
|
|
|
|
required = false)
|
|
|
|
@HeaderParam("If-Modified-Since") String ifModifiedSince,
|
|
|
|
@HeaderParam("If-Modified-Since")
|
|
|
|
|
|
|
|
String ifModifiedSince,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "offset",
|
|
|
|
name = "offset",
|
|
|
|
value = "Starting point within the complete list of items qualified.",
|
|
|
|
value = "Starting point within the complete list of items qualified.",
|
|
|
|
required = false)
|
|
|
|
required = false)
|
|
|
|
@QueryParam("offset") int offset,
|
|
|
|
@QueryParam("offset")
|
|
|
|
|
|
|
|
int offset,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "limit",
|
|
|
|
name = "limit",
|
|
|
|
value = "Maximum size of resource array to return.",
|
|
|
|
value = "Maximum size of resource array to return.",
|
|
|
|
required = false)
|
|
|
|
required = false)
|
|
|
|
@QueryParam("limit") int limit);
|
|
|
|
@QueryParam("limit")
|
|
|
|
|
|
|
|
int limit);
|
|
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
@GET
|
|
|
|
@Path("/{roleName}/permissions")
|
|
|
|
@Path("/{roleName}/permissions")
|
|
|
@ -120,9 +133,10 @@ public interface RoleManagementService {
|
|
|
|
produces = MediaType.APPLICATION_JSON,
|
|
|
|
produces = MediaType.APPLICATION_JSON,
|
|
|
|
httpMethod = "GET",
|
|
|
|
httpMethod = "GET",
|
|
|
|
value = "Getting permission details of a role.",
|
|
|
|
value = "Getting permission details of a role.",
|
|
|
|
notes = "In an organization an individual is associated a with set of responsibilities based on their " +
|
|
|
|
notes = "In an organization an individual is associated a with set of responsibilities based "
|
|
|
|
"role. In EMM you are able to configure permissions based on the responsibilities carried " +
|
|
|
|
+ "on their role. In EMM you are able to configure permissions based on the "
|
|
|
|
"out by a role. Therefore if you wish to retrieve the permission details of a role, you can do " +
|
|
|
|
+ "responsibilities carried out by a role. Therefore if you wish to retrieve the "
|
|
|
|
|
|
|
|
+ "permission details of a role, you can do " +
|
|
|
|
"so using this REST API.",
|
|
|
|
"so using this REST API.",
|
|
|
|
response = UIPermissionNode.class,
|
|
|
|
response = UIPermissionNode.class,
|
|
|
|
responseContainer = "List",
|
|
|
|
responseContainer = "List",
|
|
|
@ -145,12 +159,15 @@ public interface RoleManagementService {
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(
|
|
|
|
name = "Last-Modified",
|
|
|
|
name = "Last-Modified",
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
description = "Date and time the resource has been modified the "
|
|
|
|
|
|
|
|
+ "last time.\n" +
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
}),
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 304,
|
|
|
|
code = 304,
|
|
|
|
message = "Not Modified. \n Empty body because the client has already the latest version of the requested resource."),
|
|
|
|
message = "Not Modified. \n Empty body because the client has already the latest "
|
|
|
|
|
|
|
|
+ "version of the requested resource."),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 400,
|
|
|
|
code = 400,
|
|
|
|
message = "Bad Request. \n Invalid request or validation error.",
|
|
|
|
message = "Bad Request. \n Invalid request or validation error.",
|
|
|
@ -164,21 +181,28 @@ public interface RoleManagementService {
|
|
|
|
message = "Not Acceptable.\n The requested media type is not supported"),
|
|
|
|
message = "Not Acceptable.\n The requested media type is not supported"),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 500,
|
|
|
|
code = 500,
|
|
|
|
message = "Internal Server ErrorResponse. \n Server error occurred while fetching the permission list of the requested role.",
|
|
|
|
message = "Internal Server ErrorResponse. \n Server error occurred while fetching"
|
|
|
|
|
|
|
|
+ " the permission list of the requested role.",
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
@Permission(scope = "roles-view", permissions = {"/permission/admin/device-mgt/admin/roles/list"})
|
|
|
|
)
|
|
|
|
|
|
|
|
@Permission(
|
|
|
|
|
|
|
|
scope = "roles-view",
|
|
|
|
|
|
|
|
permissions = {"/permission/admin/device-mgt/admin/roles/list"}
|
|
|
|
|
|
|
|
)
|
|
|
|
Response getPermissionsOfRole(
|
|
|
|
Response getPermissionsOfRole(
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "roleName",
|
|
|
|
name = "roleName",
|
|
|
|
value = "Name of the role.",
|
|
|
|
value = "Name of the role.",
|
|
|
|
required = true)
|
|
|
|
required = true)
|
|
|
|
@PathParam("roleName") String roleName,
|
|
|
|
@PathParam("roleName")
|
|
|
|
|
|
|
|
String roleName,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "If-Modified-Since",
|
|
|
|
name = "If-Modified-Since",
|
|
|
|
value = "Validates if the requested variant has not been modified since the time specified",
|
|
|
|
value = "Validates if the requested variant has not been modified since the time specified",
|
|
|
|
required = false)
|
|
|
|
required = false)
|
|
|
|
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
|
|
|
@HeaderParam("If-Modified-Since")
|
|
|
|
|
|
|
|
String ifModifiedSince);
|
|
|
|
|
|
|
|
|
|
|
|
@GET
|
|
|
|
@GET
|
|
|
|
@Path("/{roleName}")
|
|
|
|
@Path("/{roleName}")
|
|
|
@ -205,12 +229,15 @@ public interface RoleManagementService {
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(
|
|
|
|
name = "Last-Modified",
|
|
|
|
name = "Last-Modified",
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
description = "Date and time the resource has been modified the "
|
|
|
|
|
|
|
|
+ "last time.\n" +
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
"Used by caches, or in conditional requests."),
|
|
|
|
}),
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 304,
|
|
|
|
code = 304,
|
|
|
|
message = "Not Modified. \n Empty body because the client has already the latest version of" +
|
|
|
|
message = "Not Modified. \n Empty body because the client has already the "
|
|
|
|
|
|
|
|
+ "latest version of" +
|
|
|
|
" the requested resource."),
|
|
|
|
" the requested resource."),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 400,
|
|
|
|
code = 400,
|
|
|
@ -228,19 +255,25 @@ public interface RoleManagementService {
|
|
|
|
message = "Internal Server ErrorResponse. \n Server error occurred while fetching the " +
|
|
|
|
message = "Internal Server ErrorResponse. \n Server error occurred while fetching the " +
|
|
|
|
"requested role.",
|
|
|
|
"requested role.",
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
@Permission(scope = "roles-view", permissions = {"/permission/admin/device-mgt/admin/roles/list"})
|
|
|
|
)
|
|
|
|
|
|
|
|
@Permission(
|
|
|
|
|
|
|
|
scope = "roles-view",
|
|
|
|
|
|
|
|
permissions = {"/permission/admin/device-mgt/admin/roles/list"}
|
|
|
|
|
|
|
|
)
|
|
|
|
Response getRole(
|
|
|
|
Response getRole(
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "roleName",
|
|
|
|
name = "roleName",
|
|
|
|
value = "Name of the role.",
|
|
|
|
value = "Name of the role.",
|
|
|
|
required = true)
|
|
|
|
required = true)
|
|
|
|
@PathParam("roleName") String roleName,
|
|
|
|
@PathParam("roleName")
|
|
|
|
|
|
|
|
String roleName,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "If-Modified-Since",
|
|
|
|
name = "If-Modified-Since",
|
|
|
|
value = "Validates if the requested variant has not been modified since the time specified",
|
|
|
|
value = "Validates if the requested variant has not been modified since the time specified",
|
|
|
|
required = false)
|
|
|
|
required = false)
|
|
|
|
@HeaderParam("If-Modified-Since") String ifModifiedSince);
|
|
|
|
@HeaderParam("If-Modified-Since")
|
|
|
|
|
|
|
|
String ifModifiedSince);
|
|
|
|
|
|
|
|
|
|
|
|
@POST
|
|
|
|
@POST
|
|
|
|
@ApiOperation(
|
|
|
|
@ApiOperation(
|
|
|
@ -250,7 +283,8 @@ public interface RoleManagementService {
|
|
|
|
value = "Add a role.",
|
|
|
|
value = "Add a role.",
|
|
|
|
notes = "You are able to add a new role to EMM using the REST API.",
|
|
|
|
notes = "You are able to add a new role to EMM using the REST API.",
|
|
|
|
tags = "Role Management")
|
|
|
|
tags = "Role Management")
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(
|
|
|
|
|
|
|
|
value = {
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 201,
|
|
|
|
code = 201,
|
|
|
|
message = "Created. \n Role has successfully been created",
|
|
|
|
message = "Created. \n Role has successfully been created",
|
|
|
@ -268,33 +302,43 @@ public interface RoleManagementService {
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(
|
|
|
|
name = "Last-Modified",
|
|
|
|
name = "Last-Modified",
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
"Used by caches, or in conditional requests.")}),
|
|
|
|
"Used by caches, or in conditional requests.")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 303,
|
|
|
|
code = 303,
|
|
|
|
message = "See Other. \n Source can be retrieved from the URL specified at the Location header.",
|
|
|
|
message = "See Other. \n Source can be retrieved from the URL specified at the Location header.",
|
|
|
|
responseHeaders = {
|
|
|
|
responseHeaders = {
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(
|
|
|
|
name = "Content-Location",
|
|
|
|
name = "Content-Location",
|
|
|
|
description = "The Source URL of the document.")}),
|
|
|
|
description = "The Source URL of the document.")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 400,
|
|
|
|
code = 400,
|
|
|
|
message = "Bad Request. \n Invalid request or validation error.",
|
|
|
|
message = "Bad Request. \n Invalid request or validation error.",
|
|
|
|
response = ErrorResponse.class),
|
|
|
|
response = ErrorResponse.class),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 415,
|
|
|
|
code = 415,
|
|
|
|
message = "Unsupported media type. \n The entity of the request was in a not supported format."),
|
|
|
|
message = "Unsupported media type. \n The entity of the request was in a not "
|
|
|
|
|
|
|
|
+ "supported format."),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 500,
|
|
|
|
code = 500,
|
|
|
|
message = "Internal Server ErrorResponse. \n " +
|
|
|
|
message = "Internal Server ErrorResponse. \n " +
|
|
|
|
"Server error occurred while adding a new role.",
|
|
|
|
"Server error occurred while adding a new role.",
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
@Permission(scope = "roles-modify", permissions = {"/permission/admin/device-mgt/admin/roles/add"})
|
|
|
|
)
|
|
|
|
|
|
|
|
@Permission(
|
|
|
|
|
|
|
|
scope = "roles-modify",
|
|
|
|
|
|
|
|
permissions = {"/permission/admin/device-mgt/admin/roles/add"}
|
|
|
|
|
|
|
|
)
|
|
|
|
Response addRole(
|
|
|
|
Response addRole(
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "role",
|
|
|
|
name = "role",
|
|
|
|
value = "Details about the role to be added.",
|
|
|
|
value = "Details about the role to be added.",
|
|
|
|
required = true) RoleWrapper role);
|
|
|
|
required = true)
|
|
|
|
|
|
|
|
RoleWrapper role);
|
|
|
|
|
|
|
|
|
|
|
|
@PUT
|
|
|
|
@PUT
|
|
|
|
@Path("/{roleName}")
|
|
|
|
@Path("/{roleName}")
|
|
|
@ -306,7 +350,8 @@ public interface RoleManagementService {
|
|
|
|
notes = "There will be situations where you will need to update the role details, such as the permissions" +
|
|
|
|
notes = "There will be situations where you will need to update the role details, such as the permissions" +
|
|
|
|
" or the role name. In such situation you can update the role details.",
|
|
|
|
" or the role name. In such situation you can update the role details.",
|
|
|
|
tags = "Role Management")
|
|
|
|
tags = "Role Management")
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(
|
|
|
|
|
|
|
|
value = {
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 200,
|
|
|
|
code = 200,
|
|
|
|
message = "OK. \n Role has been updated successfully",
|
|
|
|
message = "OK. \n Role has been updated successfully",
|
|
|
@ -324,7 +369,9 @@ public interface RoleManagementService {
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(
|
|
|
|
name = "Last-Modified",
|
|
|
|
name = "Last-Modified",
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
"Used by caches, or in conditional requests.")}),
|
|
|
|
"Used by caches, or in conditional requests.")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 400,
|
|
|
|
code = 400,
|
|
|
|
message = "Bad Request. \n Invalid request or validation error.",
|
|
|
|
message = "Bad Request. \n Invalid request or validation error.",
|
|
|
@ -340,18 +387,24 @@ public interface RoleManagementService {
|
|
|
|
message = "Internal Server ErrorResponse. \n " +
|
|
|
|
message = "Internal Server ErrorResponse. \n " +
|
|
|
|
"Server error occurred while updating the role.",
|
|
|
|
"Server error occurred while updating the role.",
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
@Permission(scope = "roles-modify", permissions = {"/permission/admin/device-mgt/admin/roles/update"})
|
|
|
|
)
|
|
|
|
|
|
|
|
@Permission(
|
|
|
|
|
|
|
|
scope = "roles-modify",
|
|
|
|
|
|
|
|
permissions = {"/permission/admin/device-mgt/admin/roles/update"}
|
|
|
|
|
|
|
|
)
|
|
|
|
Response updateRole(
|
|
|
|
Response updateRole(
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "roleName",
|
|
|
|
name = "roleName",
|
|
|
|
value = "Name of the role.",
|
|
|
|
value = "Name of the role.",
|
|
|
|
required = true)
|
|
|
|
required = true)
|
|
|
|
@PathParam("roleName") String roleName,
|
|
|
|
@PathParam("roleName")
|
|
|
|
|
|
|
|
String roleName,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "role",
|
|
|
|
name = "role",
|
|
|
|
value = "Details about the role to be added.",
|
|
|
|
value = "Details about the role to be added.",
|
|
|
|
required = true) RoleWrapper role);
|
|
|
|
required = true)
|
|
|
|
|
|
|
|
RoleWrapper role);
|
|
|
|
|
|
|
|
|
|
|
|
@DELETE
|
|
|
|
@DELETE
|
|
|
|
@Path("/{roleName}")
|
|
|
|
@Path("/{roleName}")
|
|
|
@ -361,7 +414,8 @@ public interface RoleManagementService {
|
|
|
|
notes = "In a situation when your Organization identifies that a specific role is no longer required you " +
|
|
|
|
notes = "In a situation when your Organization identifies that a specific role is no longer required you " +
|
|
|
|
"will need to remove the role details from EMM.",
|
|
|
|
"will need to remove the role details from EMM.",
|
|
|
|
tags = "Role Management")
|
|
|
|
tags = "Role Management")
|
|
|
|
@ApiResponses(value = {
|
|
|
|
@ApiResponses(
|
|
|
|
|
|
|
|
value = {
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 200,
|
|
|
|
code = 200,
|
|
|
|
message = "OK. \n Role has successfully been removed"),
|
|
|
|
message = "OK. \n Role has successfully been removed"),
|
|
|
@ -377,14 +431,19 @@ public interface RoleManagementService {
|
|
|
|
message = "Internal Server ErrorResponse. \n " +
|
|
|
|
message = "Internal Server ErrorResponse. \n " +
|
|
|
|
"Server error occurred while removing the role.",
|
|
|
|
"Server error occurred while removing the role.",
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
@Permission(scope = "roles-modify", permissions = {"/permission/admin/device-mgt/admin/roles/remove"})
|
|
|
|
)
|
|
|
|
|
|
|
|
@Permission(
|
|
|
|
|
|
|
|
scope = "roles-modify",
|
|
|
|
|
|
|
|
permissions = {"/permission/admin/device-mgt/admin/roles/remove"}
|
|
|
|
|
|
|
|
)
|
|
|
|
Response deleteRole(
|
|
|
|
Response deleteRole(
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "roleName",
|
|
|
|
name = "roleName",
|
|
|
|
value = "Name of the role to de deleted.",
|
|
|
|
value = "Name of the role to de deleted.",
|
|
|
|
required = true)
|
|
|
|
required = true)
|
|
|
|
@PathParam("roleName") String roleName);
|
|
|
|
@PathParam("roleName")
|
|
|
|
|
|
|
|
String roleName);
|
|
|
|
|
|
|
|
|
|
|
|
@PUT
|
|
|
|
@PUT
|
|
|
|
@Path("/{roleName}/users")
|
|
|
|
@Path("/{roleName}/users")
|
|
|
@ -419,7 +478,9 @@ public interface RoleManagementService {
|
|
|
|
@ResponseHeader(
|
|
|
|
@ResponseHeader(
|
|
|
|
name = "Last-Modified",
|
|
|
|
name = "Last-Modified",
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
description = "Date and time the resource has been modified the last time.\n" +
|
|
|
|
"Used by caches, or in conditional requests.")}),
|
|
|
|
"Used by caches, or in conditional requests.")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
),
|
|
|
|
@ApiResponse(
|
|
|
|
@ApiResponse(
|
|
|
|
code = 400,
|
|
|
|
code = 400,
|
|
|
|
message = "Bad Request. \n Invalid request or validation error.",
|
|
|
|
message = "Bad Request. \n Invalid request or validation error.",
|
|
|
@ -435,17 +496,23 @@ public interface RoleManagementService {
|
|
|
|
message = "Internal Server ErrorResponse. \n " +
|
|
|
|
message = "Internal Server ErrorResponse. \n " +
|
|
|
|
"Server error occurred while updating the user list of the role.",
|
|
|
|
"Server error occurred while updating the user list of the role.",
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
response = ErrorResponse.class)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
@Permission(scope = "roles-modify", permissions = {"/permission/admin/device-mgt/admin/roles/update"})
|
|
|
|
)
|
|
|
|
|
|
|
|
@Permission(
|
|
|
|
|
|
|
|
scope = "roles-modify",
|
|
|
|
|
|
|
|
permissions = {"/permission/admin/device-mgt/admin/roles/update"}
|
|
|
|
|
|
|
|
)
|
|
|
|
Response updateUsersOfRole(
|
|
|
|
Response updateUsersOfRole(
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "roleName",
|
|
|
|
name = "roleName",
|
|
|
|
value = "Name of the role.",
|
|
|
|
value = "Name of the role.",
|
|
|
|
required = true)
|
|
|
|
required = true)
|
|
|
|
@PathParam("roleName") String roleName,
|
|
|
|
@PathParam("roleName")
|
|
|
|
|
|
|
|
String roleName,
|
|
|
|
@ApiParam(
|
|
|
|
@ApiParam(
|
|
|
|
name = "users",
|
|
|
|
name = "users",
|
|
|
|
value = "List of usernames to be added.",
|
|
|
|
value = "List of usernames to be added.",
|
|
|
|
required = true) List<String> users);
|
|
|
|
required = true)
|
|
|
|
|
|
|
|
List<String> users);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|