Closed mwa closed 3 years ago
Für Meeting:
Das wäre config, oder? Wieso braucht es das? // WMS Name für wms_services "wms_name": "somap", // WFS Name für wfs_services "wfs_name": "somap",
Und nochmals { "name": "somap" },
Geometrie-Felder jeweils auch enthalten?
Besprechen - verstehen:
Grouplayer - Facadelayer - Einzellayer...?
Templates, Facets....
Feststellungen:
unified_permissions
nur falls nötigwms_name
, wfs_name
: Auf top-level verschieben, da immer gleich"name": "somap"
: Root-Layer für OGC services (noch zu diskutieren)geometry
ist nur Platzhalter für Geometriespalte) "roles": [
{
"role": "public",
"permissions": {
// WMS Name für wms_services
"wms_name": "somap",
// WFS Name für wfs_services
"wfs_name": "somap",
"all_services": [
// Dataproducts
{
"name": "myfacade"
},
"details" : {
"myfacade"{
"child1":[att1, att2]
},
"child2":[att3, att4]
}
Variante mit ausgelagerten Details für Gruppen- und Einzellayer (vgl. oben)
Zu klären:
all_services
?writable
pro Rolle?writable
zu Permissions verschiebenAktualisiertes json folgt noch von Matthias - gebe dann Feedback
Überarbeitete Version:
Danke Mathias für das update im obigen Kommentar. Passt für mich --> freigegeben
Schema ist https://github.com/qwc-services/qwc-services-core/ publiziert.
Das Laden der vereinfachten Permissions wird mit qwc-services-core
v1.2.6
unterstützt.
Aktualisierte QWC Services mit dieser qwc-services-core
Version:
qwc-data-service:v2.0.3
qwc-document-service:v2.0.1
qwc-feature-info-service:v2.0.5
qwc-fulltext-search-service:v2.1.1
qwc-legend-service:v2.0.1
qwc-map-viewer:v2.0.2
qwc-ogc-service:v2.0.2
sogis-dataproduct-service:v2.0.6
Refactoring von all_services
zu Dict statt Liste (vgl. #11)
Aktualisierte QWC Services mit qwc-services-core
v1.2.7
:
qwc-data-service:v2.0.4
qwc-document-service:v2.0.2
qwc-feature-info-service:v2.0.6
qwc-fulltext-search-service:v2.1.2
qwc-legend-service:v2.0.3
qwc-map-viewer:v2.0.4
qwc-ogc-service:v2.0.4
sogis-dataproduct-service:v2.0.7
Entwurf für vereinfachte Permissions, welche identische Rechte für Datasets/Ressourcen in allen QWC Services bereitstellen.
Diese Permissions sollen in den QWC Services beim Laden in die bisherige
permissions.json
Struktur umgewandelt werden. Diese Funktionalität sollte zentral über denPermissionsReader
imqwc-services-core
gelöst werden können.Neu:
unified_permissions
zur Kennzeichnung der vereinfachten Versionwms_name
undwfs_name
für Name des WMS/WFS inwms_services
bzw.wfs_services
all_services
statt servicespezifische Permissionsname
: Identifier des Dataproducts/Ressourceattributes
: Liste der erlaubten Attribute für Vektordatasetswritable
: Schreibrechte im Data Service, falls gesetzt (default:false
)Neben allen Dataproducts müssen zudem die internen Printlayer, Hintergrundkarten, Print Templates, Document Templates und die Standard Solr Facets in
all_resources
eingetragen werden.Beispielkonfiguration
WMS Layertree: ``` * somap (WMS Root Layer) * ch.so.afu.baugrundklassen * ch.so.agi.av.amtliche_vermessung * ch.so.agi.av.grundstuecke (Facade) * ch.so.agi.av.grundstuecke.grenzpunkte * ch.so.agi.av.grundstuecke.rechtskraeftig * ch.so.agi.av.rohrleitungen * ch.so.agi.av.grundstuecke.rechtskraeftig * 1_hintergrundkarte_sw (interner Print Layer für hintergrundkarte_sw) ``` Hintergrundkarte: `hintergrundkarte_sw` `permissions.json`: ```jsonc { "$schema": "https://github.com/qwc-services/qwc-services-core/raw/master/schemas/qwc-services-unified-permissions.json", "unified_permissions": true, "users": [ { "name": "demo", "groups": [], "roles": [ "edit_demo" ] } ], "groups": [], "roles": [ { "role": "public", "permissions": { // WMS Name für wms_services "wms_name": "somap", // WFS Name für wfs_services "wfs_name": "somap", "all_services": [ // Dataproducts { "name": "somap" }, { "name": "ch.so.afu.baugrundklassen", "attributes": [ "bgk_txt", "gz_txt", "bericht", "geometry" ] }, { "name": "ch.so.agi.av.amtliche_vermessung" }, { "name": "ch.so.agi.av.grundstuecke" }, { "name": "ch.so.agi.av.grundstuecke.grenzpunkte", "attributes": [ "punktzeichen_txt", "geometry" ] }, { "name": "ch.so.agi.av.grundstuecke.rechtskraeftig", "attributes": [ "nummer", "art_txt", "flaechenmass", "egrid", "bfs_nr", "geometry" ] }, { "name": "ch.so.agi.av.rohrleitungen", "attributes": [ "betreiber", "geometry" ] }, // interner Print Layer { "name": "1_hintergrundkarte_sw" }, // Hintergrundkarten { "name": "hintergrundkarte_sw" }, // Print Templates { "name": "A4 hoch" }, // Document templates { "name": "grundstuecksbeschrieb" }, // Standard Solr Facets { "name": "foreground" }, { "name": "background" } ] } }, { "role": "edit_demo", "permissions": { // WMS Name für wms_services "wms_name": "somap", // WFS Name für wfs_services "wfs_name": "somap", "all_services": [ // Dataproducts { "name": "somap" }, { "name": "ch.so.afu.baugrundklassen", "attributes": [ "bgk_txt", "gz_txt", "bericht", "geometry" ] }, { "name": "ch.so.agi.av.amtliche_vermessung" }, { "name": "ch.so.agi.av.grundstuecke" }, { "name": "ch.so.agi.av.grundstuecke.grenzpunkte", "attributes": [ "punktzeichen_txt", "geometry" ], // zusätzliche Schreibrechte "writable": true }, { "name": "ch.so.agi.av.grundstuecke.rechtskraeftig", "attributes": [ "nummer", "art_txt", "flaechenmass", "egrid", "bfs_nr", "geometry" ] }, { "name": "ch.so.agi.av.rohrleitungen", "attributes": [ "betreiber", "geometry" ], // zusätzliche Schreibrechte "writable": true }, // interner Print Layer { "name": "1_hintergrundkarte_sw" }, // Hintergrundkarten { "name": "hintergrundkarte_sw" }, // Print Templates { "name": "A4 hoch" }, // Document templates { "name": "grundstuecksbeschrieb" }, // Standard Solr Facets { "name": "foreground" }, { "name": "background" } ] } } ] } ```JSON Schema
```jsonc { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://github.com/qwc-services/qwc-services-core/raw/master/schemas/qwc-services-unified-permissions.json", "title": "QWC Services unified Permissions", "description": "Unified and simplified permissions if resource permissions are identical in all QWC Services", "type": "object", "properties": { "$schema": { "title": "JSON Schema", "description": "Reference to JSON schema of these permissions", "type": "string", "format": "uri", "default": "https://github.com/qwc-services/qwc-services-core/raw/master/schemas/qwc-services-unified-permissions.json" }, "unified_permissions": { "title": "Mark as unified permissions", "type": "boolean", "const": true }, "users": { "title": "Users", "type": "array", "items": { "title": "User", "type": "object", "properties": { "name": { "description": "User name", "type": "string" }, "groups": { "title": "Group memberships", "type": "array", "items": { "type": "string" } }, "roles": { "title": "Role memberships", "type": "array", "items": { "type": "string" } } }, "required": [ "name", "groups" ] } }, "groups": { "title": "Groups", "type": "array", "items": { "title": "Group", "type": "object", "properties": { "name": { "description": "Group name", "type": "string" }, "roles": { "title": "Role memberships", "type": "array", "items": { "type": "string" } } }, "required": [ "name", "roles" ] } }, "roles": { "title": "Roles", "type": "array", "items": { "title": "Role", "type": "object", "properties": { "role": { "description": "Role name", "type": "string" }, "permissions": { "title": "Permissions for role", "type": "object", "properties": { "wms_name": { "description": "WMS service name", "type": "string" }, "wfs_name": { "description": "WFS service name", "type": "string" }, "all_services": { "title": "All services", "description": "Permitted resources for all QWC services", "type": "array", "items": { "title": "Resource permissions", "type": "object", "properties": { "name": { "description": "Resource name", "type": "string" }, "attributes": { "description": "Permitted attributes for vector datasets", "type": "array", "items": { "type": "string" } }, "writable": { "description": "Dataset is writable in Data service if set", "type": "boolean" } }, "required": [ "name" ] } } }, "required": [ "wms_name", "wfs_name", "all_services" ] } }, "required": [ "role" ] } } }, "required": [ "unified_permissions", "users", "groups", "roles" ] } ```