}
}
public static void checkPassword(ConfigImpl config, String type,String password) throws SecurityException {
if(!config.hasPassword())
throw new SecurityException("can't access, no password is defined");
//print.ln(config.getPassword()+".equalsIgnoreCase("+password+")");
if(!config.isPasswordEqual(password,true)){
if(StringUtil.isEmpty(password)){
if(type==null)
throw new SecurityException("Access is protected",
"to access the configuration without a password, you need to change the access to [open] in the Server Administrator");
throw new SecurityException(type +" access is protected",
"to access the configuration without a password, you need to change the "+type+" access to [open] in the Server Administrator");
}
throw new SecurityException("No access, password is invalid");
}
}