Permission denied for postgis table update

Hello community,

I am loading in QField a project with a polygon table from a PostGIS connection for a specific user. This postgis table has many fields and I have assigned to its user permission to update only some of the fields, with GRANT uptade (fields) To user.

In QGIS everithing works ok, this user updates the fields for which he has permission and after update changes are saved.

But the very same project in QField wont let this user to save any updates at all. At the log message in QField I get the error message: “PostGIS error while changing attributes: permission denied for table my_table”.

However, if I give permission to this user to update all fields, now he will be able to save updates working with QField. But security over some fields edition (that I don’t want this user to be able to edit) is lost.

Can anyone help me on this issue, why granting update permission only over some table fields works fine in QGIS but is denied in QField?

Many thanks.

I would inspect the postgres logs. It sounds like QField is attempting to update all the fields and not just the ones you want.

thanks Andrew, it seems indeed that QField is trying to update all the fields, even though I only edit some fields with granted permission. I must say that there is no attribute form default value on update, as it could be the explanation (but if it was the case, in QGis the update would be also denied, and it is not the case).

When you suggest to inspect the postgres logs you mean in QField wrigth?

Cheking the QField log I only get the message

but this gives no details about permission denied.

Thanks.

No, I meant the postgresql logs. You should see the update statement that is failing. If that contains all attributes it would be worth raising a bug report with QField.