mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Adding isEmpty check
This commit is contained in:
parent
0642cc10d7
commit
e77d8b8b29
@ -107,7 +107,7 @@ public class UserManagementServiceImpl implements UserManagementService {
|
||||
@Override
|
||||
public Response getUser(@PathParam("username") String username, @QueryParam("domain") String domain,
|
||||
@HeaderParam("If-Modified-Since") String ifModifiedSince) {
|
||||
if (domain != null) {
|
||||
if (domain != null && !domain.isEmpty()) {
|
||||
username = domain + '/' + username;
|
||||
}
|
||||
try {
|
||||
@ -135,7 +135,7 @@ public class UserManagementServiceImpl implements UserManagementService {
|
||||
@Path("/{username}")
|
||||
@Override
|
||||
public Response updateUser(@PathParam("username") String username, @QueryParam("domain") String domain, UserInfo userInfo) {
|
||||
if (domain != null) {
|
||||
if (domain != null && !domain.isEmpty()) {
|
||||
username = domain + '/' + username;
|
||||
}
|
||||
try {
|
||||
@ -212,7 +212,7 @@ public class UserManagementServiceImpl implements UserManagementService {
|
||||
@Path("/{username}")
|
||||
@Override
|
||||
public Response removeUser(@PathParam("username") String username, @QueryParam("domain") String domain) {
|
||||
if (domain != null) {
|
||||
if (domain != null && !domain.isEmpty()) {
|
||||
username = domain + '/' + username;
|
||||
}
|
||||
try {
|
||||
@ -243,7 +243,7 @@ public class UserManagementServiceImpl implements UserManagementService {
|
||||
@Path("/{username}/roles")
|
||||
@Override
|
||||
public Response getRolesOfUser(@PathParam("username") String username, @QueryParam("domain") String domain) {
|
||||
if (domain != null) {
|
||||
if (domain != null && !domain.isEmpty()) {
|
||||
username = domain + '/' + username;
|
||||
}
|
||||
try {
|
||||
|
||||
@ -38,7 +38,7 @@ public class UserManagementAdminServiceImpl implements UserManagementAdminServic
|
||||
public Response resetUserPassword(@PathParam("username")
|
||||
@Size(max = 45)
|
||||
String user, @QueryParam("domain") String domain, PasswordResetWrapper credentials) {
|
||||
if (domain != null) {
|
||||
if (domain != null && !domain.isEmpty()) {
|
||||
user = domain + '/' + user;
|
||||
}
|
||||
return CredentialManagementResponseBuilder.buildResetPasswordResponse(user, credentials);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user