> Oh come on -- *NOBODY* here can ID this?
Not so far, evidently. I suspect it's a short story, and there's
loads of those.
For one thing, it's not clear how a "code" gets you onto or off
a planet. The method of _Stargate SG-1_ comes to mind, where
they "dial" interstellar locations on an ancient Egyptian torus.
And they close a big metal door for incoming traffic to hit hard
unless the incoming traffic sends an appropriate coded radio
signal. So, it could be a Stargate fan fiction story.
Such as, the whole of Congress is sent on a fact-finding
mission to Risa the pleasure planet.
There's a lot more stories about a social elite or sometimes
an unproductive underclass procuring themselves a paradise or
a refuge while leaving the rest of humanity behind either
to suffer grievous deprivation or to self-congratulate on
getting rid of them. The film _Metropolis_ has vertical
segregation; _Elysium_ is one of a number where the elite
head for outer space, as is Ben Elton's novel _Stark_.
_The Marching Morons_ disposes of humanity's redundant
mouths. The world of _The Hitch Hiker's Guide to the Galaxy_
has custom-made planets for fantastically rich discontented
people, offers the eugenics angle as the origin of the
human race (refugees from the allegedly doomed planet
Golgafrincham), and allowed some rich humans to escape
again to a distant carefully hidden planet called Nano.