A new position is created and someone is promoted into that job with no advertising of that job. Because it is said they have been doing the functions of that role for sometime. Is this allowed?

No knowledge of that new job role before that person promoted had been confirmed in post and it was all decided. I know you can advertise a job just internallly, but are you allowed to creatte a new postion and promote someone directly into that role without ANY advertising (internally or externally) of that job?

Thanks in advance
Quick Question