Skip to content

Commit

Permalink
Add data for testing column-restricted insert and upgrade pg table
Browse files Browse the repository at this point in the history
Useful to reproduce the crash in GH-57809
  • Loading branch information
strk committed Jun 20, 2024
1 parent 8b93068 commit b021062
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/testdata/provider/testdata_pg.sql
Original file line number Diff line number Diff line change
Expand Up @@ -815,3 +815,22 @@ GRANT
-- ,UPDATE(geom) -- intentionally kept the UPDATE out
ON qgis_issue_gh_28835
TO qgis_test_unprivileged_user;

---------------------------------------------
--
-- Table where user only has both insert and update
-- privileges on a single column
-- See https://github.com/qgis/QGIS/issues/57809
--
CREATE TABLE qgis_issue_gh_57809 (
id SERIAL PRIMARY KEY,
restricted_column TEXT,
geom GEOMETRY(Polygon, 4326)
);
GRANT USAGE
ON qgis_issue_gh_57809_id_seq
TO qgis_test_unprivileged_user;
GRANT
SELECT, INSERT(geom), UPDATE(geom)
ON qgis_issue_gh_58709
TO qgis_test_unprivileged_user;

0 comments on commit b021062

Please sign in to comment.