Sunan al-Darimi 168
أَخْبَرَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ، حَدَّثَنَا ابْنُ عُيَيْنَةَ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي يَزِيدَ، قَالَ: كَانَ ابْنُ عَبَّاسٍ ﵄ ، «إِذَا سُئِلَ عَنِ الْأَمْرِ فَكَانَ فِي الْقُرْآنِ، أَخْبَرَ بِهِ، وَإِنْ لَمْ يَكُنْ فِي الْقُرْآنِ وَكَانَ عَنْ رَسُولِ اللَّهِ ﷺ ، أَخْبَرَ بِهِ، فَإِنْ لَمْ يَكُنْ، فَعَنْ أَبِي بَكْرٍ وَعُمَرَ ﵄ - فَإِنْ لَمْ يَكُنْ، قَالَ فِيهِ بِرَأْيِهِ»
ʿAbdullah ibn Muhammad informed us; Ibn ʿUyaynah narrated to us, from ʿUbaydullah ibn Abi Yazid, who said: When Ibn ʿAbbas, may Allah be pleased with them both, "was asked about a matter and it was in the Quran, he would tell it. If it was not in the Quran but was from the Messenger of Allah ﷺ, he would tell it. If not, then from Abu Bakr and ʿUmar, may Allah be pleased with them both. If not, he would speak about it by his own opinion."