Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish SLD in dedicated WMS GeoServer workspace #237

Merged
merged 14 commits into from
Feb 4, 2021
Merged
4 changes: 2 additions & 2 deletions sample/layman.map/internal_url.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"title": "Hranice",
"className": "HSLayers.Layer.WMS",
"singleTile": true,
"url": "http://localhost:8000/geoserver/testuser1/ows",
"url": "http://localhost:8000/geoserver/testuser1_wms/ows",
"params": {
"LAYERS": "hranice",
"FORMAT": "image\/png"
Expand All @@ -52,7 +52,7 @@
"title": "Mista",
"className": "HSLayers.Layer.WMS",
"singleTile": true,
"url": "http://localhost:8000/geoserver/testuser1/ows",
"url": "http://localhost:8000/geoserver/testuser1_wms/ows",
"params": {
"LAYERS": "mista",
"FORMAT": "image\/png"
Expand Down
4 changes: 2 additions & 2 deletions sample/layman.map/internal_url_unauthorized_layer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"title": "Hranice",
"className": "HSLayers.Layer.WMS",
"singleTile": true,
"url": "http://localhost:8000/geoserver/test_map_with_unauthorized_layer_user1/ows",
"url": "http://localhost:8000/geoserver/test_map_with_unauthorized_layer_user1_wms/ows",
"params": {
"LAYERS": "test_map_with_unauthorized_layer_layer1",
"FORMAT": "image\/png"
Expand All @@ -52,7 +52,7 @@
"title": "Mista",
"className": "HSLayers.Layer.WMS",
"singleTile": true,
"url": "http://localhost:8000/geoserver/test_map_with_unauthorized_layer_user2/ows",
"url": "http://localhost:8000/geoserver/test_map_with_unauthorized_layer_user2_wms/ows",
"params": {
"LAYERS": "test_map_with_unauthorized_layer_layer2",
"FORMAT": "image\/png"
Expand Down
3 changes: 2 additions & 1 deletion src/layman/map/micka/csw.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def map_json_to_operates_on(map_json, operates_on_muuids_filter=None, editor=Non
unquote_urls(map_json)
gs_url = get_gs_proxy_base_url()
gs_url = gs_url if gs_url.endswith('/') else f"{gs_url}/"
gs_url_pattern = r'^' + re.escape(gs_url) + r'(' + USERNAME_ONLY_PATTERN + r')' + r'/(?:ows|wms|wfs).*$'
gs_url_pattern = r'^' + re.escape(gs_url) + r'(' + USERNAME_ONLY_PATTERN + r')' + \
index-git marked this conversation as resolved.
Show resolved Hide resolved
settings.LAYMAN_GS_WMS_WORKSPACE_POSTFIX + r'/(?:ows|wms|wfs).*$'
layman_layer_names = []
for map_layer in map_json['layers']:
layer_url = map_layer.get('url', None)
Expand Down