  Cosmic rays (CRs) may be used to infer properties of intervening cosmic
magnetic fields. Conversely, understanding the effects of magnetic fields on
the propagation of high-energy CRs is crucial to elucidate their origin. In the
present work we investigate the role of intracluster magnetic fields on the
propagation of CRs with energies between $10^{16}$ and $10^{18.5}$ eV. We look
for possible signatures of a transition in the CR propagation regime, from
diffusive to ballistic. Finally, we discuss the consequences of the confinement
of high-energy CRs in clusters and superclusters for the production of gamma
rays and neutrinos.
