We can't know people's hidden thoughts or the secret dispositions of their hearts, but we can now their public acts. Just for two examples: a person who wears an emblem of the LGBT movement is signaling public support for the sin of sodomy Another example: a person who gets a civil divorce and then contracts a second "marriage," is in a manifest, public, documented legal quasi-marital union based on adulterous relations.
In one of the few instances I ever heard of where Catholics were publicly denied Holy Communion and it was publicly made to stick, was in the case of something called the "Rainbow Sash Movement" Activists wore these sashes symbolizing their demand for "Gay Rights," and went into the Catholic Church (I think it was in Australia? Melbourne?) and presented themselves for Holy Communion They were turned away by the Archbishop and by every priest in his diocese.
Similarly, divorced/remarried Catholics (as their first marriages, not annulled, are presumed valid) are in public, manifest state of "marital" union with somebody who is not their spouse in the eyes of God. Therefore they are not to present themselves for the Most Blessed Sacrament unless they are abstaining from specifically adulterous acts, that is, if they are living in complete sexual continence "as brother and sister".
“They were turned away by the Archbishop and by every priest in his diocese.” Doin’ right things ... they acted courageously by our debauched modern world’s view. But in reality they were being true to their vows. The Bible refers to such fidelity as ‘steadfast’ ...