Завершение обновления безопасности.
v++
This commit is contained in:
@@ -24,12 +24,22 @@ public abstract class RepositoryServerSSHPass<S extends RepositoryServer> extend
|
||||
}
|
||||
protected abstract S getServer();
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (!Global.mainModule.getAccount().CheckAdmin(Log))
|
||||
return false;
|
||||
if (Global.normalProperties.ServerUserPassword.isEmpty()){
|
||||
Log.Writeln_("Не задан пароль");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public void Connect() throws Exception {
|
||||
userHome = null;
|
||||
serverHome = null;
|
||||
//--
|
||||
machine = new Machine("alex", Constants.ServerAddress, Constants.ServerUserSHHPort, MachineType.Server);
|
||||
user = new User(Constants.ServerUserName, Constants.ServerUserPasword);
|
||||
user = new User(Constants.ServerUserName, Global.normalProperties.ServerUserPassword); //в пропертиес. пусть админ пользуется.
|
||||
super.Connect();
|
||||
//--
|
||||
userHome = new RemoteFile(user.connection.sftpChannel.getHome(), true);
|
||||
|
||||
Reference in New Issue
Block a user