geoserver/geoserver — pull request #296 by GeoffWilliams (2013-08-15 06:16:10+00:00)
Title: [GEOS-3561] support for disabling web console at runtime

Hi,

I'd really like to be able to disable the geoserver web console for our production boxes. The suggested method of deleting the web-*.jar files doesn't work with the current version of geoserver - the whole system stops working.

This PR addresses GEOS-3561 by allowing the web console to be disabled at runtime by adding the flag:

-DGEOSERVER_CONSOLE_DISABLED=true

To the JVM arguments. I've altered the spring context file to switch to the FilePublisher mapping instead of wicket when this flag is present. The FilePublisher then delivers 404s for all requests for console pages.

I haven't included a unit test for this -- I'm not sure how I can test a JVM argument like this - any ideas (or can we get away without one)?

Thanks,
Geoff