It was during the Abbasid ruler, Mansoor, that the Muslims were granted their rights from the Bait ul Maal or State Treasury. The doors were opened and the needy were taking their share and moving off. One Muslim, named Suqrani, stood for a long time but could not get his share. One of his ancestors had been freed from slavery by the Holy Prophet (s) himself, and came to be known as the ‘One liberated by the Prophet(s)’. Suqrani took great pride in his ancestry and associated himself with the Household of the Holy Prophet (s).
He looked around to see if he recognized somebody who could help him get his share. Suddenly, he saw Imam Jafar al-Sadiq (‘a). He hurried towards him and explained his reason for being there. The Imam (‘a) solved his problem.
Before leaving, he (‘a) addressed him, saying, ‘A good deed is a good deed, no matter who performs it. Since you associate yourself with the Household of the Holy Prophet (s), a good deed will further cement that association. A bad deed is a bad deed, no matter who performs it. Since you associate yourself with the Household of The Holy Prophet (s), your bad deed will be magnified and look worse.’
Suqrani stopped, dumbfounded. He was certain that the Imam (‘a) had referred to his bad habit of drinking alcohol. Despite knowing about it, he (‘a) had not refused helping him, but done him a favour, and then affectionately jolted his conscience and saved him from a bad prohibited act.
Reference : Anecdotes of The Ahlul Bayt (Daastaan e Raastaan ) by Ayatullah Murtadha Mutahhari