Hey @Terrapop
Here is an idea for you and is how we do it.
If you run your staging env behind Apache2 (or nginx) as a reverse proxy you can set up access rules in the reverse proxy as you would with .htaccess like you are familiar with.
There are myriad advantages for running Discourse behind a reverse proxy and ease of access control is just one benefit.
HTH