avoir les cartes en main

Etymology
lit. 'to have the cards in the hand'.

Verb

 * 1)  to hold the cards, to hold all the aces to be in a strong position, possessing significant advantages over someone else
 * 2)  to have everything one needs to do something, to deal with a situation, a problem

Usage notes

 * In sense 2, chiefly used with : avoir toutes les cartes en main.