#955 closed enhancement (fixed)
PostGIS view only accessible by superuser or table owner
Reported by: | best | Owned by: | jef |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | |
Component: | Data Provider | Version: | 0.9.1 |
Keywords: | Cc: | ||
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
Only a DB-superuser and the owner of the underlying table can access a PostGIS view. Everybody else gets a message stating there was no suitable key column in the view. This message led me to qgspostgresprovider.cpp which accesses information_schema.view_column_usage. However Postgres documentation states
... A column is only included if the table that contains the column is owned by a currently enabled role.
I logged into a Postres-DB three times and executed
SELECT * FROM information_schema.view_column_usage WHERE view_name = <name_of_the_view>
- as non-superuser with select rights on the tables and views: SELECT returned no results.
- as the table owner (non-superuser) SELECT returns all columns
- as superuser (non-table-owner) SELECT returns all columns
Change History (4)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Owner: | changed from | to
---|
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I have submitted a patch on ticket #964 that addresses this along with internationalization and a number of other problems.