Merge branch 'dmgt-ra/user/bug' into 'master'

Fix the user deletion issue in devicemgt react app

Closes product-iots#300

See merge request entgra/carbon-device-mgt!414
This commit is contained in:
Dharmakeerthi Lasantha 2020-01-07 07:53:47 +00:00
commit 8fcb753568
2 changed files with 4 additions and 1 deletions

View File

@ -372,8 +372,10 @@ public interface UserManagementService {
@DELETE @DELETE
@Path("/{username}") @Path("/{username}")
@Consumes(MediaType.WILDCARD)
@ApiOperation( @ApiOperation(
httpMethod = "DELETE", httpMethod = "DELETE",
consumes = MediaType.WILDCARD,
value = "Deleting a User", value = "Deleting a User",
notes = "When an employee leaves the organization, you can remove the user details from WSO2 IoTS using " + notes = "When an employee leaves the organization, you can remove the user details from WSO2 IoTS using " +
"this REST API.", "this REST API.",

View File

@ -183,7 +183,7 @@ public class UserManagementServiceImpl implements UserManagementService {
DEFAULT_SUBSCRIBER + "' is missing in the system"); DEFAULT_SUBSCRIBER + "' is missing in the system");
} }
} }
String[] roles = new String[tmpRoles.size()]; String[] roles = new String[tmpRoles.size()];
tmpRoles.toArray(roles); tmpRoles.toArray(roles);
@ -363,6 +363,7 @@ public class UserManagementServiceImpl implements UserManagementService {
@DELETE @DELETE
@Path("/{username}") @Path("/{username}")
@Consumes(MediaType.WILDCARD)
@Override @Override
public Response removeUser(@PathParam("username") String username, @QueryParam("domain") String domain) { public Response removeUser(@PathParam("username") String username, @QueryParam("domain") String domain) {
if (domain != null && !domain.isEmpty()) { if (domain != null && !domain.isEmpty()) {