Planning permission has been granted to turn a pub into a home after its owners’ previous proposal was rejected.