according to what sb decides or wishes to do
at sb's discretion
Bail is granted at the discretion of the court.
Definiciones del Oxford Advanced Learner's Dictionary, 9.ª edición