Timeline for How do I manage user privileges when working with a QGIS project stored in a PostGIS database?
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 25 at 11:18 | vote | accept | geo_theo | ||
Oct 24 at 15:13 | answer | added | geo_theo | timeline score: 3 | |
Jun 9 at 10:28 | history | edited | Val P | CC BY-SA 4.0 |
added 8 characters in body
|
Jun 7 at 11:32 | comment | added | lhowarth | ok, so the symbology, labels, formulaires etc are included when you save the styles to your database (or even a .qml file). If you want to effectively synchronise your reader project based on changes in your editor project, you could create a plugin to do that. I.e. starting in the editor project make whatever changes you need then click your 'synchronise projects' plugin, which should update the datasources connexion parameters on all your layers (changing to your reader connexion params) and then save that project over the reader project in the database (so with the reader project name) | |
Jun 7 at 9:59 | comment | added | geo_theo | The editors mostly load new background layers & edit the attribute forms of individual layers. The attribute forms are the most important change. Maybe they could save the changes they make to the layer styles (i.e. attribute forms) to the database and that way the readers would see the changes in their project as well... | |
Jun 7 at 8:23 | comment | added | lhowarth | If your talking about specifically about changes to the QGIS project and not to the shared tables in the database then yes I see what you mean. Though any modification to the tables (shared by the projects) should appear in the reader project as well (it's the same datasource). Equally if you save/modify your default styles into the database they will be shared as well (if you don't change the style name). Otherwise, I just tested with RLS and It works pretty well - but yes ultimately you'll still have two projects. What is it you're changing in the projects ? | |
Jun 7 at 8:12 | comment | added | geo_theo | I could use RLS to have the projects in the same schema, but one issue remains: this still leaves me with two separate projects where I manually have to apply the changes of the editor's project to the reader project. I'm starting to wonder if there is no way around that... | |
Jun 7 at 7:56 | comment | added | lhowarth | All the QGIS projects will be saved into the same table in postgres, so if you can put a RLS strategy in place, then when the user connects to the database they should only be able to load the project they have rights to (from the table qgis_projects) | |
Jun 7 at 7:52 | comment | added | lhowarth | I've got a work around. When layers are loaded into a QGIS project they are loaded with the connection credentials (and the associated rights). So create two qgis projects, saved into the same schema, one where the layers are loaded with editor rights and another where the layers are loaded with reader rights. Then in postgres use row level security (RLS) to assign the rights for the row containing your READER project to your reader user. I don't have time to test this (sorry), but it should work. See : postgresqltutorial.com/postgresql-administration/… | |
Jun 6 at 20:35 | history | edited | Vince | CC BY-SA 4.0 |
removed appreciation; tyops
|
Jun 6 at 14:43 | history | asked | geo_theo | CC BY-SA 4.0 |