Skip to content

Commit

Permalink
Add _wms suffix to sample map JSON files
Browse files Browse the repository at this point in the history
  • Loading branch information
jirik committed Feb 3, 2021
1 parent 7458aa9 commit bd4cab5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
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')' + \
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

0 comments on commit bd4cab5

Please sign in to comment.