Skip to content

Commit 9c9540d

Browse files
committed
Document mapinfo permissions
1 parent e005e26 commit 9c9540d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/configuration/ResourcesPermissions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The following resource types are available:
3838
| `Viewer asset` | Viewer asset path, see [Viewer asset permissions](#viewer-asset-permissions). |
3939
| `Document template` | Document template name, see [Report permissions](../topics/Reports.md#Permissions). |
4040
| `Theme info link` | Theme info link name, see [theme info links](ThemesConfiguration.md#theme-info-links). |
41+
| `Map info query` | Map info query identifier, see [Map info permissions](../topics/Mapinfo.md#permissions). |
4142
| `Plugin` | Plugin name of [Plugin data](ThemesConfiguration.md#plugin-data) entries. |
4243
| `╰─ Plugin data` | Plugin resource name [Plugin data](ThemesConfiguration.md#plugin-data) entries. |
4344

src/topics/Mapinfo.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,20 @@ If the `qwc-mapinfo-service` is enabled, queries can be configured in the servic
1818
"info_geom_col": "wkb_geometry",
1919
"info_display_col": "name",
2020
"info_where": "type = 'Sovereign country'",
21-
"info_title": "Country"
21+
"info_title": "Country",
22+
"info_id": "country"
2223
},
2324
{
2425
"db_url": "postgresql:///?service=qwc_geodb",
2526
"info_sql": "SELECT type FROM qwc_geodb.ne_10m_admin_0_countries WHERE ST_contains(wkb_geometry, ST_SetSRID(ST_Point(:x, :y), :srid)) LIMIT 1",
26-
"info_title": "Type"
27+
"info_title": "Type",
28+
"info_id": "type"
2729
},
2830
{
2931
"db_url": "postgresql:///?service=qwc_geodb",
3032
"info_sql": "SELECT abbrev, postal, subregion FROM qwc_geodb.ne_10m_admin_0_countries WHERE ST_contains(wkb_geometry, ST_SetSRID(ST_Point(:x, :y), :srid)) LIMIT 1",
31-
"info_title": ["Abbreviation", "Postal Code", "Subregion"]
33+
"info_title": ["Abbreviation", "Postal Code", "Subregion"],
34+
"info_id": "details"
3235
}
3336
]
3437
}
@@ -44,3 +47,8 @@ If the `qwc-mapinfo-service` is enabled, queries can be configured in the servic
4447
will be returned and displayed in the map-info popup as with title as specified in `info_title`.
4548

4649
* If `info_sql` is provided, the result obtained from the specified query will be returned. Use the `:x`, `:y` and `:srid` placeholders.
50+
* The `info_id` is required if you want to assign permissions to the mapinfo queries, see below.
51+
52+
## Permissions <a name="permissions"></a>
53+
54+
You can assign permissions to the mapinfo queries by creating and permitting `Map info query` resources, which shall be named according to the `info_id` of the query. If `permissions_default_allow` is `true` in `tenatConfig.json`, all mapinfo queries are permitted by default unless a permission is assigned to a specific role.

0 commit comments

Comments
 (0)