Closed rmarianski closed 10 years ago
@jdeolive - can you review?
Looked it over, and I think the lookup preference you have implemented doesn't quite match the one that is usually used, which is:
Btw, this lookup logic is already available through the GeoServerExtensions.getProperty() method. Not sure if you explicitly avoided it or not.
Hhmm, I'd expect it to be env -> sys prop -> web.xml, but it's much better to be consistent rather than come up with a different scheme. I didn't realize that GeoServerExtensions had a utility method for this, so I'll just delegate to that. Thanks.
In the event of an override, the UI is currently displaying where that override came from: "override provenance". Changing the implementation to delegate to the GeoServerExtension utility method would mean that we wouldn't be able to show this. I don't think this is a requirement though and I just threw it in there because I had access to it. I'll remove it for now because it'll simplify the code a bit. We can always revert back and just change the ordering if we need to show it.
Btw, when I tested locally, the lookup ordering was:
That seems consistent with:
@jdeolive - looks ok to merge?
Yup, looks good Rob.
Thanks Justin.
Merged to 2.2.x, 2.3.x, and master.
Allow the api key that the mapmeter extension uses to be overridden by the environment, either through an environment variable or from a servlet context parameter. This also turns off the api key management ui in the geoserver admin interface, and instead displays the active api key in use for the instance and its source (saying either from env var or servlet context)