
    Michael FOREMAN, Appellant v. Craig LOWE, Warden; A.W. Romance; A.W. McLaughlin; Lt. Kumburis; Pike County Correctional Facility; I.C.E.; Mr. Poslusnzy; Mr. Clarke; Mr. O’Neill.
    No. 07-1995.
    United States Court of Appeals, Third Circuit.
    Submitted Pursuant to Third Circuit LAR 34.1(a) Jan. 10, 2008.
    Filed: Jan. 16, 2008.
    
      Michael Troy Foreman, pro se.
    Michael J. Donohue, Kreder, Brooks, Hailstone & Ludwig, Scranton, PA, for Craig Lowe, A.W. Romance, A.W. McLaughlin, Lt. Kumburis and Pike County Correctional Facility.
    Stephen R. Cerutti, II, Office of United States Attorney, Harrisburg, PA, for Bureau of Immigration & Customs Enforcement, P. Poslusnzy and O’Neill.
    Before: RENDELL, JORDAN and GARTH, Circuit Judges.
   OPINION OF THE COURT

PER CURIAM.

Michael Foreman appeals pro se from an order of the United States District Court for the Middle District of Pennsylvania dismissing his civil rights action brought pursuant to 42 U.S.C. § 1983 and Bivens v. Six Unknown Named Agents of Fed. Bur. of Narcotics, 403 U.S. 388, 91 S.Ct. 1999, 29 L.Ed.2d 619 (1971). We will affirm.

In March 2006, Foreman, an immigration detainee held at the Pike County Correctional Facility (“PCCF”), submitted an in forma pauperis complaint challenging his maximum custody status and alleging that the restraints attendant to such status denied him access to the courts. He named as defendants the PCCF and the Bureau of Immigration and Customs Enforcement (“ICE”), along with officials and employees of both institutions. Foreman sought monetary damages and reassignment to the general population.

The PCCF defendants filed a motion for judgement on the pleadings. See Fed. R.Civ.P. 12(c). Separately, the ICE defendants moved to dismiss or, in the alternative, for summary judgment. See Fed. R.Civ.P. 12(b)(6); 56. The District Court granted the motions, concluding that Foreman’s maximum custody classification did not violate his due process rights and that he failed to demonstrate any injury resulting from the denial of access to certain legal materials. This timely appeal followed.

Foreman first complained that he was improperly placed in maximum custody status. Because Foreman was an immigration detainee at the time of the alleged constitutional violations, he is entitled to the same protections as a pretrial detainee. See Edwards v. Johnson, 209 F.3d 772, 778 (5th Cir.2000); see also Stevenson v. Carroll, 495 F.3d 62, 69 n. 4 (3d Cir.2007). In the pretrial detainee setting, claims are reviewed pursuant to the Due Process Clause. See Hubbard v. Taylor, 399 F.3d 150, 158 (3d Cir.2005). Thus, to determine whether challenged conditions of Foreman’s confinement amount to punishment, “a court must decide whether the disability is imposed for the purpose of punishment or whether it is but an incident of some other legitimate purpose.” Id. (citing Bell v. Wolfish, 441 U.S. 520, 538-39, 99 S.Ct. 1861, 60 L.Ed.2d 447 (1979)). “Absent a showing of an expressed intent to punish on the part of detention facility officials, that determination generally will turn on ‘whether an alternative purpose to which [the restriction] may rationally be connected is assignable for it, and whether it appears excessive in relation to the alternative purpose assigned [to it].’ ” Stevenson, 495 F.3d at 67 (citing Bell, 441 U.S. at 538, 99 S.Ct. 1861). Foreman did not present any evidence demonstrating that the defendants had an express intent to punish him. Furthermore, although he complained about “sitting on maximum custody status for no reason,” prison records indicate that Foreman’s security classification was a result of his inability to follow the facility’s rules and regulations. In particular, Foreman was found guilty of threatening physical harm, possessing property belonging to another person, acting insolently toward a staff member, refusing to obey an order, and creating a minor disturbance. The warden informed Foreman that a custody-status change would be considered when he corrected his behavior. It is clear, therefore, that Foreman’s classification resulted from the legitimate purpose of preserving prison security, rather than from an effort to punish him. For these reasons, we conclude that the District Court properly rejected this claim.

In his second claim, Foreman alleged that, as a result of his maximum custody classification, he was allowed to use the prison law library only at midnight. He asserts that this limited access interfered with his ability to timely file objections to a Magistrate Judge’s Recommendation in separate civil rights action. Detainees have a right of access to the courts. See Love v. Summit County, 776 F.2d 908, 912 (10th Cir.1985); see also Lewis v. Casey, 518 U.S. 343, 116 S.Ct. 2174, 135 L.Ed.2d 606 (1996). Importantly, however, an inmate must allege an actual injury to his ability to litigate a claim to demonstrate that his constitutional right of access to the courts has been violated. See Lewis, 518 U.S. at 352-53, 116 S.Ct. 2174. An actual injury is shown only where a nonfrivolous, arguable claim is lost. See Christopher v. Harbury, 536 U.S. 403, 415, 122 S.Ct. 2179, 153 L.Ed.2d 413 (2002). We agree with the District Court that the defendants did not impair Foreman’s right of access to the courts. Tellingly, the docket sheet from the separate civil rights case indicates that Foreman obtained an 'extension of time within which to file his objections, and that he met that deadline. Thus, Foreman’s right of access to the courts was not violated.

For these reasons, we will affirm the District Court’s order. 
      
      . We exercise plenary review over orders granting motions for judgment on the pleadings and motions for summary judgment. See Leamer v. Fauver, 288 F.3d 532, 535 (3d Cir.2002); Gallo v. City of Philadelphia, 161 F.3d 217, 221 (3d Cir.01998). In reviewing an order granting a motion for judgment on the pleadings, we accept all factual allegations in the complaint as true, and we draw all reasonable inferences in the light most favorable to the plaintiff. See Turbe v. Government of Virgin Islands, 938 F.2d 427, 428 (3d Cir.1991) (holding that when a Rule 12(c) motion alleges plaintiff's failure to state a claim upon which relief can be granted, we analyze the motion under the same standard as a Rule 12(b)(6) motion to dismiss). "[WJhen ruling on a defendant’s motion to dismiss, a judge must accept as true all of the factual allegations contained in the complaint.” Erickson v. Pardus, - U.S. -, 127 S.Ct. 2197, 2200, 167 L.Ed.2d 1081 (2007) (citing Bell Atlantic Corp. v. Twombly, - U.S. -, 127 S.Ct. 1955, 1965, 167 L.Ed.2d 929 (2007)). A grant of summary judgment will be affirmed if our review reveals that “there is no genuine issue as to any material fact and that the moving party is entitled to judgment as a matter of law.” Fed.R.Civ.P. 56(c). We review the facts in the light most favorable to the party against whom summary judgment was entered. See Coolspring Stone Supply, Inc. v. American States Life Ins. Co., 10 F.3d 144, 146 (3d Cir.1993).
     
      
      . There is no suggestion that Foreman’s classification affected the time he spent in detention.
     