qgis / qwc2-demo-app

QWC2 demo application
Other
243 stars 155 forks source link

Data (Update) privileges #567

Closed FabianStoehr closed 4 months ago

FabianStoehr commented 4 months ago

Hi again,

I have a perfectly well running instance of qwc-docker app running on my server. It's an amazing tool, thank you very much for all of the developement! My QGIS project files contain data that is stored in the postgresql server instance in one of the containers. In QGIS desktop, I can select which attributes should be included in the data editing form and which data can be changed and which cannot be changed. This also works very well. I saw that in the created dataConfig.json these attributes have the constraint "readOnly": true. I need the same constraint for the geometry of the objects, i.e. users with certain privileges can only update a few attributes but cannot change anything else including the geometry of the data. Is there an inbuild option for this that I didn't see? I QGIS desktop, I couldn't find the option to "lock" the geometry of a layer. If someone knows an easy answer, I'd really appreciate it!

Thank you in advance,

Fabian

manisandro commented 4 months ago

Hi Fabian

This is currently not possible. One idea could be to extend the resources in the admin gui to support a "geometry" as child of a data resource and if this resource is permitted to a role without the "write" flag, then the geometry is read-only.

FabianStoehr commented 4 months ago

Okay, thank you for your answer. I've tried setting the geometry to read only in QGIS itself using a python script but didn't succeed so far. Your approach would be super nice, but I'm no expert yet to program such an option myself yet. Do you plan on implementing this anytime soon? I'll let you know when I managed it with qgis (of course that means, nobody can edit the geometry anymore...).

manisandro commented 4 months ago

No concrete plans, but you are welcome to contact us if you'd like to sponsor the development.

FabianStoehr commented 4 months ago

I am still a student so not really in the position to sponsor anything, but will keep this in mind!