public String input() { if (userText != null) { for (String str : userText.split("\n")) { str = str.trim(); if (str.length() == 0) { continue; } String username = str; UserDTO userDto = userConnector.findByUsername(username, ScopeHolder.getUserRepoRef()); if (userDto == null) { addActionMessage(str + " is not exists."); } else { UserStatus userStatus = authService.createOrGetUserStatus( username, userDto.getId(), ScopeHolder.getUserRepoRef(), ScopeHolder.getScopeId()); try { userStatusChecker.check(userStatus); userStatuses.add(userStatus); } catch (CheckUserStatusException ex) { addActionMessage(ex.getMessage()); } } } } roles = roleManager.find("from Role where scopeId=?", ScopeHolder.getScopeId()); roleDtos.addAll(convertRoleDtos(roles, false)); List<ScopeInfo> sharedScopeInfos = scopeConnector.findSharedScopes(); logger.info("{}", sharedScopeInfos); for (ScopeInfo scopeInfo : sharedScopeInfos) { List<Role> sharedRoles = authService.findRoles(scopeInfo.getId()); roleDtos.addAll(convertRoleDtos(sharedRoles, true)); } return INPUT; }