-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #386 from groldan/qa
QA Improvements based on SonarCloud analysis
- Loading branch information
Showing
396 changed files
with
5,693 additions
and
3,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...rver/webui/src/main/java/org/geoserver/cloud/autoconfigure/web/core/WebUIInitializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* (c) 2020 Open Source Geospatial Foundation - all rights reserved This code is licensed under the | ||
* GPL 2.0 license, available at the root application directory. | ||
*/ | ||
package org.geoserver.cloud.autoconfigure.web.core; | ||
|
||
import lombok.NonNull; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import org.geoserver.config.GeoServer; | ||
import org.geoserver.config.GeoServerInfo; | ||
import org.geoserver.config.GeoServerInfo.WebUIMode; | ||
import org.geoserver.config.GeoServerInitializer; | ||
import org.springframework.core.env.Environment; | ||
|
||
@Slf4j | ||
@RequiredArgsConstructor | ||
class WebUIInitializer implements GeoServerInitializer { | ||
|
||
private final @NonNull Environment environment; | ||
|
||
@Override | ||
public void initialize(GeoServer geoServer) throws Exception { | ||
GeoServerInfo global = geoServer.getGlobal(); | ||
WebUIMode webUIMode = global.getWebUIMode(); | ||
if (!WebUIMode.DO_NOT_REDIRECT.equals(webUIMode)) { | ||
log.info("Forcing web-ui mode to DO_NOT_REDIRECT, was {}", webUIMode); | ||
global.setWebUIMode(WebUIMode.DO_NOT_REDIRECT); | ||
geoServer.save(global); | ||
} | ||
|
||
Boolean hidefs = | ||
environment.getProperty( | ||
"geoserver.web-ui.file-browser.hide-file-system", Boolean.class); | ||
if (Boolean.TRUE.equals(hidefs)) { | ||
log.info("Setting GEOSERVER_FILEBROWSER_HIDEFS=true System Property"); | ||
System.setProperty("GEOSERVER_FILEBROWSER_HIDEFS", "true"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.