sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.63k stars 732 forks source link

Allow disabling Connect / Disconnect functions #181

Closed felixbuenemann closed 7 years ago

felixbuenemann commented 8 years ago

It would be great if there was a way to lock pgweb to a single database specified by the DATABASE_URL and disable the functionality to disconnect and connect to different databases.

There yould be a commandline switch like --single-database and an environment var like SINGLE_DATABASE=1.

sosedoff commented 8 years ago

What is your use case for such feature?

felixbuenemann commented 8 years ago

I would like to give developers access to databases for certain projects. They should not be able to connect to any other databases from pgweb.

felixbuenemann commented 8 years ago

To add a little more detail: The database server is running in a virtual private network and I would like to deploy one pgweb container per app I would like to give database access to (with different basic auth credentials).

sosedoff commented 8 years ago

Cool. Sounds interesting, few other folks have reached out to me with the same request. I'll see what i can do.

syamantm commented 8 years ago

+1

ManuelWeiss commented 8 years ago

+1

sosedoff commented 7 years ago

Implemented in master