The Supreme Court case that provided a balancing test as the guideline for most inmate rights cases was the Pell v. Procunier case.
In the Pell v. Procunier case, the petitioner disputed California’s law that prohibits media interview with prisoners. At the end of this case, it was retained that freedom of the press wasn’t denied.