One may not be strict in front of others, when what they do is permitted, in a case where it will appear to be out of arrogance. One may not be strict in front of one's Rabbi, where one's Rabbi is lenient. In fact, even if the person is strict LeShem Shamayim (for the sake of Heaven), he is placed under a ban.
Even in a case where permitting something is not so simple, one must not be strict against one's Rabbi. The exception is if one has clear proof that one should do so.
In a matter where it is obvious that something is permitted, it is inappropriate to be strict in front of one who is greater in Hokhma (wisdom), when the one who is greater permits it. In fact, the one who is greater, has the right to place him under a ban. In any case, if the one who is strict is renowned for his piousness, it is permitted.
(See Kaf Hahayyim, 63, Oth 5, Mishnah Berurah, ibid., 6)
Meqel, Mahmir, Mekel, Machmir,