Keke Palmer has been granted temporary sole custody of her 8-month-old son, Leo, and a temporary restraining order against her…