It is narrated from Ata bin Yasar (may Allah have mercy on him) that Sayyiduna Ali (may Allah be pleased with him) found a dinar in the time of the Messenger of Allah (peace and blessings be upon him). He (peace and blessings be upon him) ordered: "Announce it," but no one recognised it. He (peace and blessings be upon him) ordered Sayyiduna Ali (may Allah be pleased with him): "Consume it." Then its owner came, and he (peace and blessings be upon him) ordered Sayyiduna Ali (may Allah be pleased with him): "Pay it back."
Imam al-Shafi'i (may Allah have mercy on him) said: Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) is among those for whom charity is unlawful, because he is from Banu Hashim.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب اللقطة / 12060