Hello,
I would like to receive a List of people from the selected project by their roles.
This is my method, whats wrong?
List<ApplicationUser> getUsersForSpecifiedRolesInProject(String projectName, String role){
ErrorCollection errorCollections = new SimpleErrorCollection()
def roleInProject = ProjectRoleManager.getProjectRole(role) // role here
ProjectRoleService projectRoleServices = (ProjectRoleService) ComponentAccessor.getComponentOfType(ProjectRoleService.class)
ProjectRoleActors existingActors = projectRoleServices.getProjectRoleActors(roleInProject, projectName, errorCollections)
def usersInSpecifiedRole = existingActors.getUsers().toList()
return usersInSpecifiedRole
}
Thanks for response