You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/configuration/ResourcesPermissions.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -13,33 +13,31 @@ Roles can be given permissions on resources. That means that if you want to give
13
13
The following resource types are available:
14
14
15
15
*`Map`: WMS corresponding to a QGIS Project
16
-
*`Layer`: layer of a map
17
-
*`Attribute`: attribute of a map layer
18
-
*`Print template`: print composer template of a QGIS Project
16
+
*`Layer`: Layer of a map
17
+
*`Attribute`: Attribute of a map layer (i.e. for WFS)
18
+
*`Print template`: Print composer template of a QGIS Project
19
19
*`Data`: Data layer for editing
20
-
*`Attribute`: attribute of a data layer
20
+
*`Attribute`: Attribute of a data layer
21
21
*`Data (create)`: Data layer for creating features
22
22
*`Data (read)`: Data layer for reading features
23
23
*`Data (update)`: Data layer for updating features
24
24
*`Data (delete)`: Data layer for deleting features
25
-
*`Viewer`: custom map viewer configuration
26
-
*`Viewer task`: permittable viewer tasks
25
+
*`Viewer task`: Permittable viewer tasks
27
26
*`FeatureInfo service`: Feature info service
28
27
*`FeatureInfo layer`: Feature info layer
28
+
*`Attribute`: Attribute of a info layer
29
29
30
30
The resource name corresponds to the technical name of its resource (e.g. WMS layer name). Most notably, the name of a `map` resource corresponds to the relative path to the project below `qgs-resources` without `.qgs` extension (so i.e. the resource name for `qgs-resources/subfolder/project.qgs` will be `subfolder/project`).
31
31
32
32
*Note:* If your QGIS project is configured to return the field aliases rather than the field names in `GetFeatureInfo`, the resource name for layer `attribute` resources corresponds to the alias of the field.
33
33
34
34
Available `map`, `layer`, `attribute` and `print_template` resources are determined from WMS `GetProjectSettings` and the QGIS projects.
35
35
36
-
`data` and their `attribute` resources define a data layer for the [Data service](https://github.com/qwc-services/qwc-data-service).
36
+
The `data` and their `attribute` resources define a data layer for the [Data service](https://github.com/qwc-services/qwc-data-service).
37
37
38
38
For more detailed [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) permissions `data_create`, `data_read`, `data_update` and `data_delete` can be used instead of `data`
39
39
(`data` and `write=False` is equivalent to `data_read`; `data` and `write=True` is equivalent to all CRUD resources combined).
40
40
41
-
The `viewer` resource defines a custom viewer configuration for the map viewer (see [Custom viewer configurations](https://github.com/qwc-services/qwc-map-viewer#custom-viewer-configurations)).
42
-
43
41
The `viewer_task` resource defines viewer functionalities (e.g. printing or raster export) that can be restricted or permitted.
44
42
Their `name` (e.g. `RasterExport`) will be matched against:
45
43
- The `key` in `menuItems` and `toolbarItems` in the QWC2 `config.json`.
@@ -48,6 +46,8 @@ Their `name` (e.g. `RasterExport`) will be matched against:
48
46
49
47
*Note*: You can restrict tasks entires which specify a mode (i.e. `{"key": "Measure", "mode": "LineString"}`) by concatenating the task key and the mode as the `viewer_task` resource name, i.e. `MeasureLineString`.
50
48
49
+
The `FeatureInfo service`, `FeatureInfo layer` and subordinate `Attribute` resources allow controlling whether an entire WMS service, its layers or its attributes are queryable via GetFeatureInfo.
50
+
51
51
Restricted viewer task items are then removed from the menu and toolbar in the map viewer. Viewer tasks not explicitly added as resources are kept unchanged from the `config.json`.
52
52
53
53
*Note*: The resource types, i.e. for custom QWC2 plugins, can be extended by inserting new types into the `qwc_config.resource_types` table.
0 commit comments