Закрытие уязвимости с именами тестов
v++
This commit is contained in:
@@ -377,7 +377,7 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
GetComponentsBackUps();
|
||||
break;
|
||||
case UpdateComponent:
|
||||
//возможно со стороны админа ввод подтверждения по почте запрашивать.
|
||||
//zip
|
||||
PublishComponent();
|
||||
break;
|
||||
case ReceiveComponent:
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Constants {
|
||||
public static final int version = 1184;
|
||||
public static final int version = 1185;
|
||||
public static final int planner_version = 10;
|
||||
public static final int testingMaxKernels = 64; //вообще говоря, это параметр машины.
|
||||
//--
|
||||
|
||||
@@ -197,13 +197,7 @@ public class CreateTestFromDirectory extends Pass<Test> {
|
||||
@Override
|
||||
protected void body() throws Exception {
|
||||
ShowMessage1(dir.getName());
|
||||
//--
|
||||
File tempProject = packTestCode(); //создание копии папки, и архивация.
|
||||
//-- получить размерность консольным сапфором. папка уже отправлена и чистить ее не нужно!!
|
||||
ShowMessage2("Синтаксический анализ и определение размерности");
|
||||
if (group.language == LanguageName.fortran) {//если не определит, будут нули.
|
||||
Sapfor.getMinMaxDim(Sapfor.getTempCopy(Global.mainModule.getSapfor().getFile()), tempProject, target);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected boolean validate() {
|
||||
|
||||
@@ -4,6 +4,7 @@ import _VisualDVM.Global;
|
||||
import _VisualDVM.ProjectData.Files.FileState;
|
||||
import _VisualDVM.ProjectData.Files.ProjectFile;
|
||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
//добавить в текущую группу новый тест из текущего проекта.
|
||||
public class CreateTestFromProject extends CreateTestFromDirectory {
|
||||
db_project_info project;
|
||||
@@ -13,15 +14,27 @@ public class CreateTestFromProject extends CreateTestFromDirectory {
|
||||
}
|
||||
@Override
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
if (Global.testingServer.db.groups.getUI().canModifyCurrent(Log) && Global.mainModule.Check(Log, Current.Project)) {
|
||||
project = Global.mainModule.getProject();
|
||||
if (super.canStart(
|
||||
project.Home,
|
||||
Global.testingServer.db.groups.getUI().getCurrent())) {
|
||||
from_files_chooser = true; //чтобы опубликовал.
|
||||
return true;
|
||||
if (args.length == 0) {
|
||||
if (Global.testingServer.db.groups.getUI().canModifyCurrent(Log) && Global.mainModule.Check(Log, Current.Project)) {
|
||||
project = Global.mainModule.getProject();
|
||||
if (super.canStart(
|
||||
project.Home,
|
||||
Global.testingServer.db.groups.getUI().getCurrent())) {
|
||||
from_files_chooser = true; //чтобы опубликовал.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
project = (db_project_info) args[0];
|
||||
group = (Group) args[1];
|
||||
//если проект не текущий, освежить его бд.
|
||||
if (!Global.mainModule.HasProject() || !Global.mainModule.getProject().Home.equals(project.Home)) {
|
||||
project.Open();
|
||||
project.Close();
|
||||
}
|
||||
return super.canStart(project.Home, group);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,7 @@ public class CreateTestsGroupFromSelectedVersions extends PublishTests {
|
||||
protected boolean canStart(Object... args) throws Exception {
|
||||
target = new Vector<>();
|
||||
//---
|
||||
if (Global.testingServer.db.groups.getUI().CheckCurrent(Log)) {
|
||||
if (Global.testingServer.db.groups.getUI().canModifyCurrent(Log)) {
|
||||
group = Global.testingServer.db.groups.getUI().getCurrent();
|
||||
} else
|
||||
return false;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package _VisualDVM.TestingSystem.Common.Test.UI;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
||||
import _VisualDVM.Global;
|
||||
import _VisualDVM.TestingSystem.Common.Group.Group;
|
||||
import _VisualDVM.TestingSystem.Common.Test.Test;
|
||||
import _VisualDVM.Utils;
|
||||
public class TestDialog extends DBObjectDialog<Test, TestFields> {
|
||||
public TestDialog() {
|
||||
super(TestFields.class);
|
||||
@@ -23,6 +25,7 @@ public class TestDialog extends DBObjectDialog<Test, TestFields> {
|
||||
+
|
||||
Global.testingServer.db.getTable(Group.class).getUI().getCurrent().language);
|
||||
}
|
||||
Utils.validateFileShortNewName(fields.tfName.getText(),Log);
|
||||
}
|
||||
@Override
|
||||
public void fillFields() {
|
||||
|
||||
Reference in New Issue
Block a user