Albus Dumbledore served as Chief Warlock of the Wizengamot (the wizarding court's highest authority) alongside his duties as Headmaster of Hogwarts. This position gave him significant influence over wizarding law and justice. He was never Minister of Magic nor a mere adviser.