Describe the bug
If a layer is padlocked in the legend due to insufficient access rights Origo still tries to request the legend graphics. At least on Geoserver this will fail, causing an unnecessary network call and displaying an ugly broken link image.
To Reproduce
Steps to reproduce the behavior:
- Configure a layer in Geoserver to require an access group that you don't belong to
- Log out of Geoserver gui to avoid being admitted as admin
- Configure a WMS layer in Origo with the layer that you don't have access to
- Configure the WMS's source to use a
capabilitiesURL
- Open the map in a browser
- Open devtools in the browser
- Refresh page
- Depending on you catalog mode setting in Geoserver you will either see a 403 or 200 response with an error message saying that the layer is missing
- Look at the legend to see that se symbol is not downloaded and instead displays the browser's broken image link image:
Expected behavior
No request should be sent as it is bound to fail and the legend should display some sort of "no legend available" image/text
Additional context
Preventing fetching the actual map data was implemented for padlocked layers in #2255 but I guess we missed this one.
Describe the bug
If a layer is padlocked in the legend due to insufficient access rights Origo still tries to request the legend graphics. At least on Geoserver this will fail, causing an unnecessary network call and displaying an ugly broken link image.
To Reproduce
Steps to reproduce the behavior:
capabilitiesURLExpected behavior
No request should be sent as it is bound to fail and the legend should display some sort of "no legend available" image/text
Additional context
Preventing fetching the actual map data was implemented for padlocked layers in #2255 but I guess we missed this one.