[Qgis-developer] PostgreSQL table with column-specific insert permissions

Jürgen E. Fischer jef at norbit.de
Mon May 16 02:25:37 PDT 2016


Hi Pablo,

On Mon, 16. May 2016 at 09:32:48 +0100, Pablo Fernández Moniz wrote:
> Our team has recently found that whenever we define a PostgreSQL table with
> column-specific insert permissions (see [1]), QGIS does not allow the option
> to save a new feature, although it seems that is possible to update.

QGIS doesn't support attribute level permissions.   A provider can only return
layer level capabilities
(https://qgis.org/api/classQgsVectorDataProvider.html#a1a360c9e78933697b9f9be334cfcaf7a)

In the postgres case column permissions are only evaluate on the geometry
column as that can be mapped to the ChangeGeometries capabilities (ie. layers
only have that capabilities when UPDATE on that column is granted).


> We would like to ask if there are any plans to support this PostgreSQL
> behaviour in the future.

The interface of the vector layers would need to enhanced to make this
possible.  The INSERT case would probably mean that new features are missing
attributes or are readonly and need be skipped when adding features.

 
Jürgen

-- 
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden             http://www.norbit.de
QGIS release manager (PSC)  Germany                    IRC: jef on FreeNode                         
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160516/30b75653/attachment.sig>


More information about the Qgis-developer mailing list