++
роль студента
This commit is contained in:
12
.idea/workspace.xml
generated
12
.idea/workspace.xml
generated
@@ -7,11 +7,15 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DropSapforConfigurationEthalon.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationsForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/UI/SapforPackagesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/UI/SapforPackagesForm.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/AccountRole.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/AccountRole.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UI/UserAccountFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UI/UserAccountFields.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$/src/_VisualDVM/MainModule.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/MainModule.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Interface/MainWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Interface/MainWindow.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/MainUI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/MainUI.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/MainForm.java" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"ErasePackageWorkspace": true,
|
||||
"lastMachineId": 28,
|
||||
"lastUserId": 36,
|
||||
"lastCompilerId": 110,
|
||||
"lastCompilerId": 109,
|
||||
"RegisterOn": false,
|
||||
"SpacesOn": false,
|
||||
"EmptyLinesOn": false,
|
||||
|
||||
@@ -3,6 +3,7 @@ import java.io.Serializable;
|
||||
public enum AccountRole implements Serializable {
|
||||
Undefined,
|
||||
User,
|
||||
Student,
|
||||
Developer,
|
||||
Admin;
|
||||
public String getDescription() {
|
||||
@@ -11,6 +12,8 @@ public enum AccountRole implements Serializable {
|
||||
return "не зарегистрирован";
|
||||
case User:
|
||||
return "Пользователь";
|
||||
case Student:
|
||||
return "Студент";
|
||||
case Developer:
|
||||
return "Разработчик";
|
||||
case Admin:
|
||||
|
||||
@@ -17,6 +17,7 @@ public class UserAccountFields implements DialogFields {
|
||||
tfAddress = new StyledTextField();
|
||||
cbRole = new JComboBox<>();
|
||||
cbRole.addItem(AccountRole.User);
|
||||
cbRole.addItem(AccountRole.Student);
|
||||
cbRole.addItem(AccountRole.Developer);
|
||||
cbRole.addItem(AccountRole.Admin);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Constants {
|
||||
public static final int version = 1229;
|
||||
public static final int version = 1230;
|
||||
public static final int planner_version = 24;
|
||||
public static final int testingMaxKernels = 64;
|
||||
//--
|
||||
|
||||
@@ -148,6 +148,9 @@ public class MainModule extends MainModule_<GlobalDatabase, MainUI> {
|
||||
for (PassCode code : accountRoleDependentPasses)
|
||||
getPass(code).setControlsVisible(false);
|
||||
}
|
||||
public void SetStudentPassesAccess(){
|
||||
SetUserPassesAccess();
|
||||
}
|
||||
public void SetDeveloperPassesAccess() {
|
||||
SetUserPassesAccess();
|
||||
getPass(PassCode.CreateTestsGroupFromSelectedVersions).setControlsVisible(true);
|
||||
|
||||
@@ -20,6 +20,7 @@ public interface MainWindow {
|
||||
void ShowCheckedTestsCount();
|
||||
void ShowUndefinedTabs();
|
||||
void ShowUserTabs();
|
||||
void ShowStudentTabs();
|
||||
void ShowDeveloperTabs();
|
||||
void ShowAdminTabs();
|
||||
}
|
||||
|
||||
@@ -129,6 +129,20 @@ public class MainUI extends UIModule_ {
|
||||
Global.normalProperties.AutoCheckTesting = false;
|
||||
Global.normalProperties.Update();
|
||||
}
|
||||
void showStudentRights(){
|
||||
Global.mainModule.SetUserPassesAccess();
|
||||
getMainWindow().ShowStudentTabs();
|
||||
getTestingMenuBar().showServerAdminLabel(false);
|
||||
getMainWindow().getCallbackWindow().showAllBugreports();
|
||||
Global.normalProperties.setControlVisible("AutoBugReportsLoad", true);
|
||||
Global.normalProperties.setControlVisible("AutoTestsLoad", false);
|
||||
Global.normalProperties.setControlVisible("CreateEthalonTasks", false);
|
||||
Global.normalProperties.setControlVisible("CompleteCompilationOptions", false);
|
||||
Global.normalProperties.setControlVisible("CompleteRunEnvironments", false);
|
||||
Global.normalProperties.setControlVisible("ErasePackageWorkspace", false);
|
||||
Global.normalProperties.AutoCheckTesting = false;
|
||||
Global.normalProperties.Update();
|
||||
}
|
||||
;
|
||||
void showDeveloperRights() {
|
||||
Global.mainModule.SetDeveloperPassesAccess();
|
||||
@@ -164,6 +178,9 @@ public class MainUI extends UIModule_ {
|
||||
case User:
|
||||
showUserRights();
|
||||
break;
|
||||
case Student:
|
||||
showStudentRights();
|
||||
break;
|
||||
case Developer:
|
||||
showDeveloperRights();
|
||||
break;
|
||||
|
||||
@@ -268,7 +268,9 @@ public class MainForm extends Form implements MainWindow {
|
||||
}
|
||||
@Override
|
||||
public void ShowUserTabs() {
|
||||
//тоже ничего не делаем.
|
||||
}
|
||||
@Override
|
||||
public void ShowStudentTabs() {
|
||||
}
|
||||
@Override
|
||||
public void ShowDeveloperTabs() {
|
||||
|
||||
Reference in New Issue
Block a user