Why not Chekov? There was plenty of time for his assignment status to be updated (there was never any stated question of him going anywhere else) and he's back at the nav station when the film begins. His voice was on file, he knew the codes, the other two codes were correct. As long as you've been granted permissions, it shouldn't matter which of the group enters the code. It could have been Bones or Sulu, as long as they had access rights. Something this important would have to allow others to step up in the event someone else is killed or indisposed. If you confine it to the top 3 officers, you're screwed if the XO is dead. Even the captain would have to have a backup.
Resolved to my satisfaction.