Skip to content

Commit

Permalink
Documentation: add information about QGIS protected attributes (#11593)
Browse files Browse the repository at this point in the history
* Add some information about QGIS protected attributes

* Update doc/integrator/backend_qgis.rst

Co-authored-by: Stéphane Brunner <[email protected]>

---------

Co-authored-by: Stéphane Brunner <[email protected]>
  • Loading branch information
jwkaltz and sbrunner committed Dec 18, 2024
1 parent b0315b7 commit b4bc608
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
47 changes: 31 additions & 16 deletions doc/integrator/backend_qgis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,6 @@ and the configuration should be as follows:
* WFS support: recommended to be ``[X]``
* Is single tile: recommended to be ``[ ]``

Access Restriction
******************

The access restriction is available only for Docker projects.

We provide a Docker image named ``camptocamp/geomapfish-qgisserver`` with tag pattern:
``gmf<Major GeoMapFish version}-qgis${Major QGIS}``.

From version 2.7 the config is just made with the ``GEOMAPFISH_ACCESSCONTROL_BASE_URL`` environment
variable which contains the base URL of the OGC servers, by default it's set to
``QGISSERVER_URL``. And the plugin will search for the OGC servers that match with this base URL.
It also requires that the OGC servers are configured with an URL like that
``config://qgisserver?map=<project_file>``.

The configuration that use the ``QGIS_PROJECT_FILE`` or ``GEOMAPFISH_ACCESSCONTROL_CONFIG`` are still
working but are deprecated.

Project in Database
*******************
Expand Down Expand Up @@ -214,6 +198,37 @@ in the vars file add:
With that you will not have URL encoding issues.


Access Restrictions
===================

The access restriction functionality described here is available only for Docker projects.

We provide a Docker image named ``camptocamp/geomapfish-qgisserver`` with tag pattern:
``gmf<Minor GeoMapFish version}-qgis<Minor QGIS version>[-gdal<Minor GDAL version>]``.


Access Restriction on QGIS OGC server
*************************************

From version 2.7 the config is just made with the ``GEOMAPFISH_ACCESSCONTROL_BASE_URL`` environment
variable which contains the base URL of the OGC servers, by default it's set to
``QGISSERVER_URL``. And the plugin will search for the OGC servers that match with this base URL.
It also requires that the OGC servers are configured with an URL like that
``config://qgisserver?map=<project_file>``.

The configuration that use the ``QGIS_PROJECT_FILE`` or ``GEOMAPFISH_ACCESSCONTROL_CONFIG`` are still
working but are deprecated.


Protecting Attributes
*********************

Individual attributes can be protected via the layer metadata setting ``protectedAttributes``. To define which roles shall
have access, the functionality ``allowed_attributes`` must be used in combination with this setting. As WMS layer name,
the actual (exposed) WMS layer name must be used in this configuration.


Landing page
============

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ vars:
- name: protectedAttributes
type: list
description: >
For QGIS server: List of attribute names that's protected, to be used with the `allowed_attributes` functionality.
For QGIS server: List of attribute names that are protected, to be used with the `allowed_attributes` functionality.
relevant_for:
- layer_wms
# WMTS layers
Expand Down

0 comments on commit b4bc608

Please sign in to comment.