1 Commits

Author SHA1 Message Date
3287410940 отладочный порт 2025-12-13 18:00:23 +03:00
3 changed files with 18 additions and 5 deletions

4
.idea/workspace.xml generated
View File

@@ -7,9 +7,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccount.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -2,6 +2,7 @@ package _VisualDVM.ComponentsServer.UserAccount;
import Common.Database.Objects.DBObject;
import Common.Database.Objects.iDBObject;
import Common.Utils.TextLog;
import _VisualDVM.ComponentsServer.BugReport.BugReport;
import _VisualDVM.Global;
import com.sun.org.glassfish.gmbal.Description;
import org.apache.commons.io.FileUtils;
@@ -74,6 +75,20 @@ public class UserAccount extends iDBObject {
public boolean CheckAccessRights(String address_in, TextLog log) {
return (CheckRegistered(log) && CheckAuthorship(address_in, log));
}
public boolean ExtendedCheckAccessRights(BugReport bugReport, TextLog log) {
if (CheckRegistered(log)) {
if (email.equals(bugReport.executor_address)) {
//метод вывести как нерабочий.когда будет изменена схема админства.
return true;
} else {
if (!isAdmin() && (!email.equals(bugReport.sender_address))) {
log.Writeln_("Вы не являетесь автором, исполнителем, или администратором");
return false;
} else return true;
}
}
return false;
}
public boolean isAdmin() {
return role.equals(AccountRole.Admin);
}

View File

@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
import java.util.Vector;
public class Constants {
public static final int version = 1262;
public static final int version = 1261;
public static final int planner_version = 24;
public static final int testingMaxKernels = 64;
//--
@@ -47,7 +47,7 @@ public class Constants {
public static final int MailSocketPort = 465;
//
//7998 отладочный порт. теперь.
public static final int ComponentsServerPort = 7995; //7795
public static final int ComponentsServerPort = 7998; //7795
public static final int TestingServerPort = 7996; //7996
public static final int SocketTimeout = 0;
//-