Sayyidah Umm al-Tufayl (may Allah be pleased with her) reports this saying of the Prophet (peace and blessings be upon him): "It used to be said that among what people have found of the words of prophethood (is this): When you have no shame, then do whatever you wish."
Al-Tabarani recorded it in al-Mu'jam al-Awsat, and its chain contains narrators whom I do not know.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الأدب / 12713