Fix su controlli in UtilityDebug
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
All checks were successful
IntegryManagementSystem_Multi/pipeline/head This commit looks good
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
package it.integry.ems.utility;
|
||||
|
||||
import it.integry.ems.settings.Model.SettingsModel;
|
||||
import org.springframework.web.context.ContextLoader;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class UtilityDebug {
|
||||
@@ -18,16 +15,17 @@ public class UtilityDebug {
|
||||
|
||||
|
||||
public static boolean isIntegryServer() {
|
||||
SettingsModel settingsModel = ContextLoader.getCurrentWebApplicationContext().getBean(SettingsModel.class);
|
||||
return isIntegryServerDev() || isIntegryServerMaster();
|
||||
}
|
||||
|
||||
return settingsModel.getDefaultProfile().equalsIgnoreCase("INTEGRY") ||
|
||||
settingsModel.getDefaultProfile().equalsIgnoreCase("STUDIO-ML");
|
||||
public static boolean isIntegryServerMaster() {
|
||||
String computerName = getComputerName();
|
||||
return computerName.equalsIgnoreCase("SERVERTOMCAT");
|
||||
}
|
||||
|
||||
public static boolean isIntegryServerDev() {
|
||||
String computerName = getComputerName();
|
||||
|
||||
return computerName.equalsIgnoreCase("SERVERDEV");
|
||||
return isDebugExecution() && computerName.equalsIgnoreCase("SERVERDEV");
|
||||
}
|
||||
|
||||
private static String getComputerName() {
|
||||
|
||||
Reference in New Issue
Block a user