Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS thinks PostgreSQL columns are not ReadOnly even if the connected user has no update privilege on them #57871

Open
2 tasks done
strk opened this issue Jun 25, 2024 · 0 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider

Comments

@strk
Copy link
Contributor

strk commented Jun 25, 2024

What is the bug or the crash?

QGIS doesn't consider PostgreSQL privilege on table columns when determining editability

Steps to reproduce the issue

Run this in the PostgreSQL database:

create table t(id serial primary key, restricted_column text, g geometry);
grant insert(g) on t to qgis_test_unprivileged_user;

Create a layer against t, fetch fields, check .isReadOnly() on fields (or .isEditable() on feature fields).

All fields will result editable (not readonly) but none really is

Versions

Current master branch 77dfdfa

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

I've found this while working on GH-28835

@strk strk added Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider labels Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! PostGIS data provider
Projects
None yet
Development

No branches or pull requests

1 participant