to change the rules to suit a particular person or situation
bend / stretch the rules
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition