A federal appeals court has dismissed a retaliation lawsuit filed by a custodian found sunbathing naked on the roof of the northeast Kansas elementary school where he worked.

The Kansas City, Kansas, school district in 2007 gave Charles Davis a 30-day unpaid suspension and demoted him from his position as head custodian following the incident.

Davis later applied for head custodian jobs at seven schools in the district but was rejected. His claims against the district included racial discrimination and retaliation for filing the discrimination claim.

The U.S. Circuit Court of Appeals on Monday upheld a lower court's award of summary judgment dismissing the lawsuit. The appeals court said Davis failed to prove he was the victim of retaliation.