0

I have a PostGIS DB with three roles: admin, user and readonly.

When I set up a connection to this database via "Add PostGIS layer" this connection is saved as it should be. So I login as admin to create some tables. I don't save any login informations.

But now I have no possibility to logout and re-login as another user e.g. to check if I set up permissions correctly or whatever.

I tried to reconnect via "Add PostGIS layer" but this has no effect. The only way to do this seems to close QGIS and restart it.

Is there another way to logout and re-login as another user? For now this has to be done using QGIS 2.18.


Figured out I can run 3 instances of QGIS with 3 different login-informations at the same time. Better than restarting, but not the "solution" I was hoping for...

MrXsquared
  • 34,292
  • 21
  • 67
  • 117
  • maybe using "changeDataSource" plugin ,look at this https://gis.stackexchange.com/questions/62610/changing-data-source-of-layer-in-qgis – Fran Raga Aug 13 '19 at 09:35
  • you can add another connection as the ReadOnly user and add the layer from this account. The behaviour( not editable for example) is observable – LaughU Aug 13 '19 at 09:51
  • Seems to be logical, but unfortunately this does not work. QGIS recognizes the two connections to the same DB as one somehow. And again only the login information I entered first is used. Therefore also changeDataSource plugin doesn't help, as it is using the connections provided by QGIS. – MrXsquared Aug 13 '19 at 10:47
  • I'm highly interested by the solution you will find ... i always found that's some big issue. Surprised you don't get any answer ... summer time maybe ... lol – Snaileater Aug 15 '19 at 09:14
  • Maybe creating av new qgis user profile with readonly-rights saved to it. This way you can switch between those, however it will launch a new qgis session... – Spiran Nov 05 '19 at 09:24

0 Answers0