Rabbi Yochanan says that it is always forbidden to shame a person,
no matter the circumstances. It is preferable to let yourself be harmed.
Micah Rothkopf:
I do not agree with Rabbi Yochanan
I think that his perspective is very biblical and ancient.
During his time, I think that this is appropriate,
however now this is an impossible request.
In the time of war, one must fight for what they believe
and yet they are shaming and hurting others, but this is for a cause.
This said, I still feel that we should–to the best of our abilities–
help others even if some harm may come to us,
but this is based on how one judges the situation
Rabbi Yohanan says in the name of Rabbi Shimon ben Yohai:
It is better for a person to throw himself into a fiery furnace
if faced with the choice of publicly embarrassing another or remaining silent,
even if it leads to being burned, and not humiliate another in public.