|
|
@ -104,8 +104,11 @@ public class UserManagementServiceImpl implements UserManagementService {
|
|
|
|
userInfo.getEmailAddress());
|
|
|
|
userInfo.getEmailAddress());
|
|
|
|
// calling addUser method of carbon user api
|
|
|
|
// calling addUser method of carbon user api
|
|
|
|
List<String> tmpRoles = new ArrayList<>();
|
|
|
|
List<String> tmpRoles = new ArrayList<>();
|
|
|
|
|
|
|
|
String[] userInfoRoles = userInfo.getRoles();
|
|
|
|
tmpRoles.add(DEFAULT_DEVICE_USER);
|
|
|
|
tmpRoles.add(DEFAULT_DEVICE_USER);
|
|
|
|
tmpRoles.addAll(Arrays.asList(userInfo.getRoles()));
|
|
|
|
if (userInfoRoles != null) {
|
|
|
|
|
|
|
|
tmpRoles.addAll(Arrays.asList(userInfoRoles));
|
|
|
|
|
|
|
|
}
|
|
|
|
String[] roles = new String[tmpRoles.size()];
|
|
|
|
String[] roles = new String[tmpRoles.size()];
|
|
|
|
tmpRoles.toArray(roles);
|
|
|
|
tmpRoles.toArray(roles);
|
|
|
|
|
|
|
|
|
|
|
|