It is narrated from Imam Ali (AS) who said:
The one who attacks when becomes powerless, and avenges when in power; is not patient; rather a patient person is the one who when in power, is forgiving, and tolerance dominates all his/her matters (affairs) [1].
[1] Tasnif Qorarul Hekam wa Dorarul Kalam, Page 286, Hadith 6437.
Source: en.shafaqna.com