@@ -452,22 +452,26 @@ private void handleFrontPage(HttpServletRequest request, HttpServletResponse res
452452 }
453453
454454 StringBuilder str = new StringBuilder ();
455-
456- String version = GeoWebCache .getVersion ();
457- String commitId = GeoWebCache .getBuildRevision ();
458- if (version == null ) {
459- version = "{NO VERSION INFO IN MANIFEST}" ;
460- }
461- if (commitId == null ) {
462- commitId = "{NO BUILD INFO IN MANIFEST}" ;
463- }
464-
465455 str .append ("<html>\n "
466456 + ServletUtils .gwcHtmlHeader (baseUrl , "GWC Home" )
467457 + "<body>\n "
468458 + ServletUtils .gwcHtmlLogoLink (baseUrl ));
469- str .append ("<h3>Welcome to GeoWebCache version " + version + ", build " + commitId + "</h3>\n " );
470- str .append ("<p><a href=\" http://geowebcache.org\" >GeoWebCache</a> is an advanced tile cache for WMS servers." );
459+ str .append ("<h3>Welcome to GeoWebCache" );
460+ boolean isAdmin = this .securityDispatcher .isAdmin ();
461+ if (isAdmin ) {
462+ String version = GeoWebCache .getVersion ();
463+ String commitId = GeoWebCache .getBuildRevision ();
464+ if (version == null ) {
465+ version = "{NO VERSION INFO IN MANIFEST}" ;
466+ }
467+ if (commitId == null ) {
468+ commitId = "{NO BUILD INFO IN MANIFEST}" ;
469+ }
470+ str .append (" version " ).append (version ).append (", build " ).append (commitId );
471+ }
472+ str .append ("</h3>\n " );
473+ str .append (
474+ "<p><a href=\" https://geowebcache.osgeo.org\" >GeoWebCache</a> is an advanced tile cache for WMS servers. " );
471475 str .append (
472476 "It supports a large variety of protocols and formats, including WMS-C, WMTS, KML, Google Maps and Virtual Earth.</p>" );
473477 str .append ("<h3>Automatically Generated Demos:</h3>\n " );
@@ -477,25 +481,26 @@ private void handleFrontPage(HttpServletRequest request, HttpServletResponse res
477481 str .append ("<ul><li><a href=\" "
478482 + baseUrl
479483 + "service/wmts?REQUEST=getcapabilities\" >WMTS 1.0.0 GetCapabilities document</a></li>" );
484+ str .append ("<li><a href=\" " + baseUrl + "service/tms/1.0.0\" >TMS 1.0.0 document</a></li>" );
480485 str .append (
481486 "<li><a href=\" "
482487 + baseUrl
483488 + "service/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=getcapabilities&TILED=true\" >WMS 1.1.1 GetCapabilities document</a></li>" );
484- str .append ("<li><a href=\" " + baseUrl + "service/tms/1.0.0\" >TMS 1.0.0 document</a></li>" );
485- str .append ("<li>Note that the latter will only work with clients that are " );
489+ str .append ("<li>Note that the latter (WMS) will only work with clients that are " );
486490 str .append ("<a href=\" http://wiki.osgeo.org/wiki/WMS_Tiling_Client_Recommendation\" >WMS-C capable</a>.</li>\n " );
487491 str .append ("<li>Omitting tiled=true from the URL will omit the TileSet elements.</li></ul>\n " );
488- if (runtimeStats != null ) {
489- str .append ("<h3>Runtime Statistics</h3>\n " );
490- str .append (runtimeStats .getHTMLStats ());
491- str .append ("</table>\n " );
492- }
493- if (!Boolean .parseBoolean (GeoWebCacheExtensions .getProperty ("GEOWEBCACHE_HIDE_STORAGE_LOCATIONS" ))) {
494- appendStorageLocations (str );
495- }
496-
497- if (storageBroker != null ) {
498- appendInternalCacheStats (str );
492+ if (isAdmin ) {
493+ if (runtimeStats != null ) {
494+ str .append ("<h3>Runtime Statistics</h3>\n " );
495+ str .append (runtimeStats .getHTMLStats ());
496+ str .append ("</table>\n " );
497+ }
498+ if (!Boolean .parseBoolean (GeoWebCacheExtensions .getProperty ("GEOWEBCACHE_HIDE_STORAGE_LOCATIONS" ))) {
499+ appendStorageLocations (str );
500+ }
501+ if (storageBroker != null ) {
502+ appendInternalCacheStats (str );
503+ }
499504 }
500505 str .append ("</body></html>\n " );
501506
0 commit comments