It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) used to take allegiance on the condition of listening and obeying, then he would say: "As much as you are able (you will listen and obey as far as possible)."