The metal fuselage of an aircraft, being highly conductive, protects occupants, interior components and fuel from the effects of lightning by conducting the electricity around them.
Some newer aircraft, such as B787 have a fuselage made entirely out of composite materials. The major portion of the 787 is made from carbon fiber plastic laminate. Although carbon fiber conducts electricity it has a higher electrical resistance. Higher resistance means more heat generated by the material. And carbon fiber makes up only a percentage of the composite.
Has the composite material been found to have enough conductivity to deal with a direct lightning strike without damage to either the material itself or the contents of the plane? Or do designers deal with lightning strikes in some other way?
 Boeing 787 Systems Manual.
 Electrical and mechanical properties of electrically conductive polyethersulfone composites. Lin Li and D.D.L. Chung, 1991, State University of New York at Buffalo. [.pdf]