Bug report #9844

postgis: if owner is a group it is not possible to add/remove columns (in field calculator or vector properties) but DB manager can

Added by Giovanni Manghi about 10 years ago. Updated about 9 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:Data Provider/PostGIS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18374

Description

Take a PostGIS db and add a group, then grant this group to a user(s) and then grant the ownership of a table to the group:

  • as expected DB manager can add/remove columns (so actually making an "alter table") as do does pgadmin
  • using the field calculator (or the vector properties -> fields tab) it is not possible to add/remove columns

Related issues

Related to QGIS Application - Bug report #11538: Field Calculator cannot update certain PostGIS tables Closed 2014-11-03

Associated revisions

Revision f8f27135
Added by Jürgen Fischer about 9 years ago

postgres provider: improve owner check (fixes #9844)

History

#1 Updated by Yves Jacolin about 10 years ago

Hello,

Not sure if this issue is link to this but I have an another use case:

  • Take a PostGIS db and then grant the ownership of a table to user "X", GRANT right to "Y" to allow modification of the table's structure
  • connect to this DB with user "Y" in QGIS
  • DB Manager and QGIS (fields tab in properties windows) can't modify the structure of the table
  • PgAdmin connected with user "Y" can modify the table

Regards,

Y.

#2 Updated by Giovanni Manghi about 10 years ago

Yves Jacolin wrote:

Hello,

Not sure if this issue is link to this but I have an another use case:

  • Take a PostGIS db and then grant the ownership of a table to user "X", GRANT right to "Y" to allow modification of the table's structure
  • connect to this DB with user "Y" in QGIS
  • DB Manager and QGIS (fields tab in properties windows) can't modify the structure of the table
  • PgAdmin connected with user "Y" can modify the table

I'm not a postgresql/postgis guru, but I always assumed that (example) a GRANT ALL is not enough to allow a user/group change a table structure. The ownership is mandatory. In this sense I would be surprised if pgamdin allows to modify the table structure for a user/group without ownership. Is this the case?

#3 Updated by Jürgen Fischer almost 10 years ago

  • Target version changed from Version 2.4 to Future Release - High Priority

#4 Updated by Jürgen Fischer about 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF