no message
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Current;
|
||||
import Common.UI.UI;
|
||||
import GlobalData.Account.AccountRole;
|
||||
import Visual_DVM_2021.Passes.PassCode_2021;
|
||||
import Visual_DVM_2021.Passes.Pass_2021;
|
||||
public class CheckAccount extends Pass_2021<Boolean> {
|
||||
@@ -19,10 +20,36 @@ public class CheckAccount extends Pass_2021<Boolean> {
|
||||
}
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
switch (Current.getAccount().email){
|
||||
case "vmk-post@yandex.ru":
|
||||
case "79854210702@ya.ru":
|
||||
Current.getAccount().role = AccountRole.Admin;
|
||||
target = true;
|
||||
break;
|
||||
case "npodderyugina@gmail.com":
|
||||
case "savol@keldysh.ru":
|
||||
case "mkocharmin@yandex.ru":
|
||||
case "juk.06@list.ru":
|
||||
Current.getAccount().role = AccountRole.Developer;
|
||||
target = true;
|
||||
break;
|
||||
case "?":
|
||||
Current.getAccount().role = AccountRole.Undefined;
|
||||
target = false;
|
||||
break;
|
||||
default:
|
||||
Current.getAccount().role =AccountRole.User;
|
||||
target = true;
|
||||
break;
|
||||
}
|
||||
|
||||
//временно. оффлайн проверка по почте
|
||||
/*
|
||||
target = Current.getAccount().email.equals("?") ?
|
||||
(Pass_2021.passes.get(PassCode_2021.EditAccount).Do() &&
|
||||
Pass_2021.passes.get(PassCode_2021.CheckRegistrationOnServer).Do()) :
|
||||
(Pass_2021.passes.get(PassCode_2021.CheckRegistrationOnServer).Do());
|
||||
*/
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.Utils.Utils;
|
||||
import GlobalData.Machine.Machine;
|
||||
import GlobalData.Machine.MachineType;
|
||||
import GlobalData.RemoteFile.RemoteFile;
|
||||
import GlobalData.User.User;
|
||||
import ProjectData.LanguageName;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -27,8 +31,8 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
|
||||
}
|
||||
@Override
|
||||
public void Connect() throws Exception {
|
||||
machine = Constants.repository_machine;
|
||||
user = Constants.repository_user;
|
||||
machine = new Machine("Ubuntu", Global.properties.ServerAddress, 23, MachineType.Server);
|
||||
user = new User(Global.properties.ServerUserName, "mprit_2011", "");
|
||||
super.Connect();
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,7 @@ public abstract class RepositoryPass<S extends RepositoryServer, T> extends Pass
|
||||
}
|
||||
//-
|
||||
protected void connect() throws Exception {
|
||||
clientSocket = Utils.createClientSocket(InetAddress.getByName(Constants.ServerAddress),
|
||||
clientSocket = Utils.createClientSocket(InetAddress.getByName(Global.properties.ServerAddress),
|
||||
server.getPort(),
|
||||
getTimeout()
|
||||
);
|
||||
|
||||
@@ -403,15 +403,15 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
|
||||
lAccountRole.setText(Utils.Brackets(Current.getAccount().role.getDescription()));
|
||||
switch (Current.getAccount().role) {
|
||||
case Undefined:
|
||||
UI.Clear(accountPanel);
|
||||
accountPanel.add(new CallbackWelcomeForm().content);
|
||||
UI.getMainWindow().SwitchTestingTabs(false);
|
||||
break;
|
||||
/// UI.Clear(accountPanel);
|
||||
// accountPanel.add(new CallbackWelcomeForm().content);
|
||||
// UI.getMainWindow().SwitchTestingTabs(false);
|
||||
// break;
|
||||
case User:
|
||||
//видит только свои баги.
|
||||
EnableBugreports();
|
||||
setUserRights();
|
||||
break;
|
||||
// EnableBugreports();
|
||||
// setUserRights();
|
||||
// break;
|
||||
case Developer:
|
||||
EnableBugreports();
|
||||
setDeveloperRights();
|
||||
|
||||
Reference in New Issue
Block a user