Correct. Generally, abilities that prevent players from performing actions override abilities that enable players to perform actions, so the fact that Leyline of Anticipation grants flash does not affect what City of Solitude does.
One of the golden rules of Magic is, that "can't beats can". "Can only" represents a resriction just like "can't", and restrictions vs. permissions is really what this rule is about. So neither you nor your opponent can cast spells outside of your turns in your scenario.
Rule 101.2: When a rule or effect allows or directs something to happen, and another effect states that it can’t happen, the “can’t” effect takes precedence.
Leyline of Anticipation
If I have City in play and opp has Leyline, can they cast spells on my turn? No right?
Former Rules Advisor
"Everything's better with pirates." - Lodge
(The Gamers: Dorkness Rising)
"Any sufficiently analyzed magic is indistinguishable from science."
(Girl Genius - Fairy Tale Theater Break - Cinderella, end of volume 8)
RULES OF MAGIC :
http://magic.wizards.com/en/game-info/gameplay/rules-and-formats/rules