public ProfesorVM(usuarios usuarioLogueado) { if (usuarioLogueado.roles.Contains("ROLE_ADMIN")) { CursosImpartidos = BBDDService.getCursos(); ProfesorLogueado = new profesores(); ProfesorLogueado.nombre = usuarioLogueado.username; } else { ProfesorLogueado = BBDDService.getProfesorByUsername(usuarioLogueado.username); CursosImpartidos = BBDDService.getCursosByProfesor(ProfesorLogueado.id); } }