Details
Description
What the correct behaviour would be when disabling a Store?
Currently that doesn't imply disabling it's layers, so disabling a store and going to the layer preview page still shows up the layers from the disabled store, and they can be viewed.
Two options:
- disabling a store disables it's layers
- or disabling a sore does not disable it's layers but we add logic to avoid serving layers from disabled stores.
For instance, both LayerInfo and ResourceInfo have a isEnabled property, but I don't see where in the code a ResourceInfo is being set to enabled (not in org.geoserver.web.data.resource).
I think option 2 is the one I like more provided that we change the isEnabled property semantics to be:
- ResourceInfo.isEnabled = getStore().isEnabled && this.enabled
- LayerInfo.isEnabled = getResource().isEnabled && this.enabled
so it gets well encapsulated. What do you think?
Yeah, option one would introduce quite some headaches workflow wise (e.g., when you re-enable the store, do you cascade that to layers? What if not all layers were enabled before the store was disabled, by re-enabling you get a situation different than before). +1 on going with option 2, works for me.