This is MOST definitely discrimination. They should have called to notify there was even a position available. Just because you are on maternity leave doesn't mean you can't go for the position.

My manager rings me about once a week to let me know of any changes that affect me, as my work place is going through huge changes at the moment. She is also letting me know about any promotional opportunities. I can still go for these positions and start them when my mat' leave is over.

SoonToBeMum, it is not selfish of you to be thinking this. I presume that this managerial position came with some kind of pay rise which can only be good for your finances and, ultimately, you family life.

Caro's idea of finding a new job is right on the nut.