SEBWIN-414: Implemented new mechanism to allow or deny reconfiguration.
This commit is contained in:
parent
8a385a55d0
commit
252e807c44
15 changed files with 1185 additions and 953 deletions
|
@ -27,5 +27,10 @@ namespace SafeExamBrowser.Browser.Contracts.Events
|
||||||
/// The full path under which the specified file should be saved.
|
/// The full path under which the specified file should be saved.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DownloadPath { get; set; }
|
public string DownloadPath { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL of the resource to be downloaded.
|
||||||
|
/// </summary>
|
||||||
|
public string Url { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ namespace SafeExamBrowser.Browser.Handlers
|
||||||
|
|
||||||
private void RequestConfigurationFileDownload(DownloadItem downloadItem, IBeforeDownloadCallback callback)
|
private void RequestConfigurationFileDownload(DownloadItem downloadItem, IBeforeDownloadCallback callback)
|
||||||
{
|
{
|
||||||
var args = new DownloadEventArgs();
|
var args = new DownloadEventArgs { Url = downloadItem.Url };
|
||||||
|
|
||||||
logger.Debug($"Handling download of configuration file '{downloadItem.SuggestedFileName}'.");
|
logger.Debug($"Handling download of configuration file '{downloadItem.SuggestedFileName}'.");
|
||||||
ConfigurationDownloadRequested?.Invoke(downloadItem.SuggestedFileName, args);
|
ConfigurationDownloadRequested?.Invoke(downloadItem.SuggestedFileName, args);
|
||||||
|
|
|
@ -610,18 +610,87 @@ namespace SafeExamBrowser.Client.UnitTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Reconfiguration_MustDenyIfInExamMode()
|
public void Reconfiguration_MustAllowIfNoQuitPasswordSet()
|
||||||
{
|
{
|
||||||
settings.ConfigurationMode = ConfigurationMode.Exam;
|
var args = new DownloadEventArgs();
|
||||||
messageBox.Setup(m => m.Show(
|
|
||||||
It.IsAny<TextKey>(),
|
appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist";
|
||||||
It.IsAny<TextKey>(),
|
runtimeProxy.Setup(r => r.RequestReconfiguration(It.IsAny<string>())).Returns(new CommunicationResult(true));
|
||||||
It.IsAny<MessageBoxAction>(),
|
|
||||||
It.IsAny<MessageBoxIcon>(),
|
|
||||||
It.IsAny<IWindow>())).Returns(MessageBoxResult.Ok);
|
|
||||||
|
|
||||||
sut.TryStart();
|
sut.TryStart();
|
||||||
browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", new DownloadEventArgs());
|
browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args);
|
||||||
|
args.Callback(true, string.Empty);
|
||||||
|
|
||||||
|
runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny<string>()), Times.Once);
|
||||||
|
Assert.IsTrue(args.AllowDownload);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Reconfiguration_MustAllowWithQuitPasswordAndNoUrl()
|
||||||
|
{
|
||||||
|
var args = new DownloadEventArgs();
|
||||||
|
|
||||||
|
appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist";
|
||||||
|
settings.Security.AllowReconfiguration = true;
|
||||||
|
settings.Security.QuitPasswordHash = "abc123";
|
||||||
|
runtimeProxy.Setup(r => r.RequestReconfiguration(It.IsAny<string>())).Returns(new CommunicationResult(true));
|
||||||
|
|
||||||
|
sut.TryStart();
|
||||||
|
browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args);
|
||||||
|
args.Callback(true, string.Empty);
|
||||||
|
|
||||||
|
runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny<string>()), Times.Once);
|
||||||
|
Assert.IsTrue(args.AllowDownload);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Reconfiguration_MustAllowIfUrlMatches()
|
||||||
|
{
|
||||||
|
var args = new DownloadEventArgs { Url = "sebs://www.somehost.org/some/path/some_configuration.seb?query=123" };
|
||||||
|
|
||||||
|
appConfig.TemporaryDirectory = @"C:\Folder\Does\Not\Exist";
|
||||||
|
settings.Security.AllowReconfiguration = true;
|
||||||
|
settings.Security.QuitPasswordHash = "abc123";
|
||||||
|
settings.Security.ReconfigurationUrl = "sebs://www.somehost.org/some/path/*.seb?query=123";
|
||||||
|
runtimeProxy.Setup(r => r.RequestReconfiguration(It.IsAny<string>())).Returns(new CommunicationResult(true));
|
||||||
|
|
||||||
|
sut.TryStart();
|
||||||
|
browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args);
|
||||||
|
args.Callback(true, string.Empty);
|
||||||
|
|
||||||
|
runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny<string>()), Times.Once);
|
||||||
|
Assert.IsTrue(args.AllowDownload);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Reconfiguration_MustDenyIfNotAllowed()
|
||||||
|
{
|
||||||
|
var args = new DownloadEventArgs();
|
||||||
|
|
||||||
|
settings.Security.AllowReconfiguration = false;
|
||||||
|
settings.Security.QuitPasswordHash = "abc123";
|
||||||
|
|
||||||
|
sut.TryStart();
|
||||||
|
browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args);
|
||||||
|
|
||||||
|
runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny<string>()), Times.Never);
|
||||||
|
Assert.IsFalse(args.AllowDownload);
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Reconfiguration_MustDenyIfUrlDoesNotMatch()
|
||||||
|
{
|
||||||
|
var args = new DownloadEventArgs { Url = "sebs://www.somehost.org/some/path/some_configuration.seb?query=123" };
|
||||||
|
|
||||||
|
settings.Security.AllowReconfiguration = false;
|
||||||
|
settings.Security.QuitPasswordHash = "abc123";
|
||||||
|
settings.Security.ReconfigurationUrl = "sebs://www.somehost.org/some/path/other_configuration.seb?query=123";
|
||||||
|
|
||||||
|
sut.TryStart();
|
||||||
|
browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args);
|
||||||
|
|
||||||
|
runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny<string>()), Times.Never);
|
||||||
|
Assert.IsFalse(args.AllowDownload);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
|
|
@ -10,6 +10,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using SafeExamBrowser.Applications.Contracts;
|
using SafeExamBrowser.Applications.Contracts;
|
||||||
using SafeExamBrowser.Browser.Contracts;
|
using SafeExamBrowser.Browser.Contracts;
|
||||||
|
@ -330,7 +331,26 @@ namespace SafeExamBrowser.Client
|
||||||
|
|
||||||
private void Browser_ConfigurationDownloadRequested(string fileName, DownloadEventArgs args)
|
private void Browser_ConfigurationDownloadRequested(string fileName, DownloadEventArgs args)
|
||||||
{
|
{
|
||||||
if (Settings.Security.AllowReconfiguration)
|
var allow = true;
|
||||||
|
var hasQuitPassword = !string.IsNullOrWhiteSpace(Settings.Security.QuitPasswordHash);
|
||||||
|
var hasUrl = !string.IsNullOrWhiteSpace(Settings.Security.ReconfigurationUrl);
|
||||||
|
|
||||||
|
if (hasQuitPassword)
|
||||||
|
{
|
||||||
|
if (hasUrl)
|
||||||
|
{
|
||||||
|
var expression = Regex.Escape(Settings.Security.ReconfigurationUrl).Replace(@"\*", ".*");
|
||||||
|
var regex = new Regex($"^{expression}$", RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
allow = Settings.Security.AllowReconfiguration && regex.IsMatch(args.Url);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
allow = Settings.Security.AllowReconfiguration;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (allow)
|
||||||
{
|
{
|
||||||
args.AllowDownload = true;
|
args.AllowDownload = true;
|
||||||
args.Callback = Browser_ConfigurationDownloadFinished;
|
args.Callback = Browser_ConfigurationDownloadFinished;
|
||||||
|
|
|
@ -29,19 +29,27 @@ namespace SafeExamBrowser.Configuration.UnitTests.ConfigurationData
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void MustAllowReconfigurationAccordingToMode()
|
public void MustAllowBrowserToolbarForReloading()
|
||||||
{
|
{
|
||||||
var settings1 = new AppSettings { ConfigurationMode = ConfigurationMode.ConfigureClient };
|
var raw = new Dictionary<string, object>();
|
||||||
var settings2 = new AppSettings { ConfigurationMode = ConfigurationMode.Exam };
|
var settings = new AppSettings();
|
||||||
|
|
||||||
settings1.Security.AllowReconfiguration = false;
|
raw.Add(Keys.Browser.ShowReloadButton, true);
|
||||||
settings2.Security.AllowReconfiguration = true;
|
settings.Browser.AdditionalWindow.AllowReloading = false;
|
||||||
|
settings.Browser.MainWindow.AllowReloading = false;
|
||||||
|
|
||||||
sut.Process(new Dictionary<string, object>(), settings1);
|
sut.Process(raw, settings);
|
||||||
sut.Process(new Dictionary<string, object>(), settings2);
|
|
||||||
|
|
||||||
Assert.IsTrue(settings1.Security.AllowReconfiguration);
|
Assert.IsFalse(settings.Browser.AdditionalWindow.ShowToolbar);
|
||||||
Assert.IsFalse(settings2.Security.AllowReconfiguration);
|
Assert.IsFalse(settings.Browser.MainWindow.ShowToolbar);
|
||||||
|
|
||||||
|
settings.Browser.AdditionalWindow.AllowReloading = true;
|
||||||
|
settings.Browser.MainWindow.AllowReloading = true;
|
||||||
|
|
||||||
|
sut.Process(raw, settings);
|
||||||
|
|
||||||
|
Assert.IsTrue(settings.Browser.AdditionalWindow.ShowToolbar);
|
||||||
|
Assert.IsTrue(settings.Browser.MainWindow.ShowToolbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
|
|
@ -21,6 +21,9 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||||
case Keys.Security.AdminPasswordHash:
|
case Keys.Security.AdminPasswordHash:
|
||||||
MapAdminPasswordHash(settings, value);
|
MapAdminPasswordHash(settings, value);
|
||||||
break;
|
break;
|
||||||
|
case Keys.Security.AllowReconfiguration:
|
||||||
|
MapAllowReconfiguration(settings, value);
|
||||||
|
break;
|
||||||
case Keys.Security.AllowTermination:
|
case Keys.Security.AllowTermination:
|
||||||
MapAllowTermination(settings, value);
|
MapAllowTermination(settings, value);
|
||||||
break;
|
break;
|
||||||
|
@ -30,6 +33,9 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||||
case Keys.Security.QuitPasswordHash:
|
case Keys.Security.QuitPasswordHash:
|
||||||
MapQuitPasswordHash(settings, value);
|
MapQuitPasswordHash(settings, value);
|
||||||
break;
|
break;
|
||||||
|
case Keys.Security.ReconfigurationUrl:
|
||||||
|
MapReconfigurationUrl(settings, value);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +53,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MapAllowReconfiguration(AppSettings settings, object value)
|
||||||
|
{
|
||||||
|
if (value is bool allow)
|
||||||
|
{
|
||||||
|
settings.Security.AllowReconfiguration = allow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void MapAllowTermination(AppSettings settings, object value)
|
private void MapAllowTermination(AppSettings settings, object value)
|
||||||
{
|
{
|
||||||
if (value is bool allow)
|
if (value is bool allow)
|
||||||
|
@ -111,5 +125,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||||
settings.Security.VirtualMachinePolicy = allow ? VirtualMachinePolicy.Allow : VirtualMachinePolicy.Deny;
|
settings.Security.VirtualMachinePolicy = allow ? VirtualMachinePolicy.Allow : VirtualMachinePolicy.Deny;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MapReconfigurationUrl(AppSettings settings, object value)
|
||||||
|
{
|
||||||
|
if (value is string url)
|
||||||
|
{
|
||||||
|
settings.Security.ReconfigurationUrl = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,17 +19,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||||
{
|
{
|
||||||
internal void Process(IDictionary<string, object> rawData, AppSettings settings)
|
internal void Process(IDictionary<string, object> rawData, AppSettings settings)
|
||||||
{
|
{
|
||||||
AllowReconfiguration(settings);
|
|
||||||
AllowBrowserToolbarForReloading(rawData, settings);
|
AllowBrowserToolbarForReloading(rawData, settings);
|
||||||
CalculateConfigurationKey(rawData, settings);
|
CalculateConfigurationKey(rawData, settings);
|
||||||
RemoveLegacyBrowsers(settings);
|
RemoveLegacyBrowsers(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AllowReconfiguration(AppSettings settings)
|
|
||||||
{
|
|
||||||
settings.Security.AllowReconfiguration = settings.ConfigurationMode == ConfigurationMode.ConfigureClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AllowBrowserToolbarForReloading(IDictionary<string, object> rawData, AppSettings settings)
|
private void AllowBrowserToolbarForReloading(IDictionary<string, object> rawData, AppSettings settings)
|
||||||
{
|
{
|
||||||
var showReloadButton = rawData.TryGetValue(Keys.Browser.ShowReloadButton, out var v) && v is bool show && show;
|
var showReloadButton = rawData.TryGetValue(Keys.Browser.ShowReloadButton, out var v) && v is bool show && show;
|
||||||
|
|
|
@ -210,11 +210,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||||
{
|
{
|
||||||
internal const string AdminPasswordHash = "hashedAdminPassword";
|
internal const string AdminPasswordHash = "hashedAdminPassword";
|
||||||
internal const string AllowApplicationLog = "allowApplicationLog";
|
internal const string AllowApplicationLog = "allowApplicationLog";
|
||||||
|
internal const string AllowReconfiguration = "examSessionReconfigureAllow";
|
||||||
internal const string AllowTermination = "allowQuit";
|
internal const string AllowTermination = "allowQuit";
|
||||||
internal const string AllowVirtualMachine = "allowVirtualMachine";
|
internal const string AllowVirtualMachine = "allowVirtualMachine";
|
||||||
internal const string KioskModeCreateNewDesktop = "createNewDesktop";
|
internal const string KioskModeCreateNewDesktop = "createNewDesktop";
|
||||||
internal const string KioskModeDisableExplorerShell = "killExplorerShell";
|
internal const string KioskModeDisableExplorerShell = "killExplorerShell";
|
||||||
internal const string QuitPasswordHash = "hashedQuitPassword";
|
internal const string QuitPasswordHash = "hashedQuitPassword";
|
||||||
|
internal const string ReconfigurationUrl = "examSessionReconfigureConfigURL";
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static class Server
|
internal static class Server
|
||||||
|
|
|
@ -163,7 +163,6 @@ namespace SafeExamBrowser.Runtime.UnitTests
|
||||||
var args = new ReconfigurationEventArgs { ConfigurationPath = "C:\\Some\\File\\Path.seb" };
|
var args = new ReconfigurationEventArgs { ConfigurationPath = "C:\\Some\\File\\Path.seb" };
|
||||||
|
|
||||||
StartSession();
|
StartSession();
|
||||||
currentSettings.Security.AllowReconfiguration = true;
|
|
||||||
bootstrapSequence.Reset();
|
bootstrapSequence.Reset();
|
||||||
sessionSequence.Reset();
|
sessionSequence.Reset();
|
||||||
sessionSequence.Setup(s => s.TryRepeat()).Returns(OperationResult.Success);
|
sessionSequence.Setup(s => s.TryRepeat()).Returns(OperationResult.Success);
|
||||||
|
@ -182,7 +181,6 @@ namespace SafeExamBrowser.Runtime.UnitTests
|
||||||
public void Communication_MustInformClientAboutAbortedReconfiguration()
|
public void Communication_MustInformClientAboutAbortedReconfiguration()
|
||||||
{
|
{
|
||||||
StartSession();
|
StartSession();
|
||||||
currentSettings.Security.AllowReconfiguration = true;
|
|
||||||
sessionSequence.Reset();
|
sessionSequence.Reset();
|
||||||
sessionSequence.Setup(s => s.TryRepeat()).Returns(OperationResult.Aborted);
|
sessionSequence.Setup(s => s.TryRepeat()).Returns(OperationResult.Aborted);
|
||||||
|
|
||||||
|
@ -191,25 +189,6 @@ namespace SafeExamBrowser.Runtime.UnitTests
|
||||||
clientProxy.Verify(c => c.InformReconfigurationAborted(), Times.Once);
|
clientProxy.Verify(c => c.InformReconfigurationAborted(), Times.Once);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void Communication_MustInformClientAboutDeniedReconfiguration()
|
|
||||||
{
|
|
||||||
var args = new ReconfigurationEventArgs { ConfigurationPath = "C:\\Some\\File\\Path.seb" };
|
|
||||||
|
|
||||||
StartSession();
|
|
||||||
currentSettings.Security.AllowReconfiguration = false;
|
|
||||||
bootstrapSequence.Reset();
|
|
||||||
sessionSequence.Reset();
|
|
||||||
|
|
||||||
runtimeHost.Raise(r => r.ReconfigurationRequested += null, args);
|
|
||||||
|
|
||||||
bootstrapSequence.VerifyNoOtherCalls();
|
|
||||||
clientProxy.Verify(c => c.InformReconfigurationDenied(It.Is<string>(s => s == args.ConfigurationPath)), Times.Once);
|
|
||||||
sessionSequence.VerifyNoOtherCalls();
|
|
||||||
|
|
||||||
Assert.AreNotEqual(sessionContext.ReconfigurationFilePath, args.ConfigurationPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Communication_MustShutdownUponRequest()
|
public void Communication_MustShutdownUponRequest()
|
||||||
{
|
{
|
||||||
|
|
|
@ -344,18 +344,10 @@ namespace SafeExamBrowser.Runtime
|
||||||
|
|
||||||
private void RuntimeHost_ReconfigurationRequested(ReconfigurationEventArgs args)
|
private void RuntimeHost_ReconfigurationRequested(ReconfigurationEventArgs args)
|
||||||
{
|
{
|
||||||
if (Session.Settings.Security.AllowReconfiguration)
|
logger.Info($"Accepted request for reconfiguration with '{args.ConfigurationPath}'.");
|
||||||
{
|
sessionContext.ReconfigurationFilePath = args.ConfigurationPath;
|
||||||
logger.Info($"Accepted request for reconfiguration with '{args.ConfigurationPath}'.");
|
|
||||||
sessionContext.ReconfigurationFilePath = args.ConfigurationPath;
|
|
||||||
|
|
||||||
StartSession();
|
StartSession();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
logger.Info($"Denied request for reconfiguration with '{args.ConfigurationPath}'!");
|
|
||||||
sessionContext.ClientProxy.InformReconfigurationDenied(args.ConfigurationPath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RuntimeHost_ShutdownRequested()
|
private void RuntimeHost_ShutdownRequested()
|
||||||
|
|
|
@ -46,6 +46,11 @@ namespace SafeExamBrowser.Settings.Security
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string QuitPasswordHash { get; set; }
|
public string QuitPasswordHash { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An URL to optionally restrict with which resource SEB may be reconfigured. Allows the usage of a wildcard character (<c>*</c>).
|
||||||
|
/// </summary>
|
||||||
|
public string ReconfigurationUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines whether SEB is allowed to run in a virtual machine.
|
/// Determines whether SEB is allowed to run in a virtual machine.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -197,6 +197,8 @@ namespace SebWindowsConfig
|
||||||
public const String KeyRestartExamURL = "restartExamURL";
|
public const String KeyRestartExamURL = "restartExamURL";
|
||||||
public const String KeyRestartExamUseStartURL = "restartExamUseStartURL";
|
public const String KeyRestartExamUseStartURL = "restartExamUseStartURL";
|
||||||
public const String KeyRestartExamPasswordProtected = "restartExamPasswordProtected";
|
public const String KeyRestartExamPasswordProtected = "restartExamPasswordProtected";
|
||||||
|
public const String KeyAllowReconfiguration = "examSessionReconfigureAllow";
|
||||||
|
public const String KeyReconfigurationUrl = "examSessionReconfigureConfigURL";
|
||||||
|
|
||||||
// Group Additional Resources
|
// Group Additional Resources
|
||||||
public const String KeyAdditionalResources = "additionalResources";
|
public const String KeyAdditionalResources = "additionalResources";
|
||||||
|
@ -712,6 +714,8 @@ namespace SebWindowsConfig
|
||||||
SEBSettings.settingsDefault.Add(SEBSettings.KeyRestartExamUseStartURL, false);
|
SEBSettings.settingsDefault.Add(SEBSettings.KeyRestartExamUseStartURL, false);
|
||||||
SEBSettings.settingsDefault.Add(SEBSettings.KeyRestartExamText, "");
|
SEBSettings.settingsDefault.Add(SEBSettings.KeyRestartExamText, "");
|
||||||
SEBSettings.settingsDefault.Add(SEBSettings.KeyRestartExamPasswordProtected, true);
|
SEBSettings.settingsDefault.Add(SEBSettings.KeyRestartExamPasswordProtected, true);
|
||||||
|
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowReconfiguration, false);
|
||||||
|
SEBSettings.settingsDefault.Add(SEBSettings.KeyReconfigurationUrl, "");
|
||||||
|
|
||||||
// Default settings for group "Additional Resources"
|
// Default settings for group "Additional Resources"
|
||||||
SEBSettings.settingsDefault.Add(SEBSettings.KeyAdditionalResources, new ListObj());
|
SEBSettings.settingsDefault.Add(SEBSettings.KeyAdditionalResources, new ListObj());
|
||||||
|
|
95
SebWindowsConfig/SebWindowsConfigForm.Designer.cs
generated
95
SebWindowsConfig/SebWindowsConfigForm.Designer.cs
generated
|
@ -30,8 +30,8 @@ namespace SebWindowsConfig
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SebWindowsConfigForm));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SebWindowsConfigForm));
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.openFileDialogSebConfigFile = new System.Windows.Forms.OpenFileDialog();
|
this.openFileDialogSebConfigFile = new System.Windows.Forms.OpenFileDialog();
|
||||||
this.saveFileDialogSebConfigFile = new System.Windows.Forms.SaveFileDialog();
|
this.saveFileDialogSebConfigFile = new System.Windows.Forms.SaveFileDialog();
|
||||||
this.imageListTabIcons = new System.Windows.Forms.ImageList(this.components);
|
this.imageListTabIcons = new System.Windows.Forms.ImageList(this.components);
|
||||||
|
@ -291,6 +291,7 @@ namespace SebWindowsConfig
|
||||||
this.radioButtonUserAgentDesktopDefault = new System.Windows.Forms.RadioButton();
|
this.radioButtonUserAgentDesktopDefault = new System.Windows.Forms.RadioButton();
|
||||||
this.radioButtonUserAgentDesktopCustom = new System.Windows.Forms.RadioButton();
|
this.radioButtonUserAgentDesktopCustom = new System.Windows.Forms.RadioButton();
|
||||||
this.groupBox11 = new System.Windows.Forms.GroupBox();
|
this.groupBox11 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.checkBoxAllowFind = new System.Windows.Forms.CheckBox();
|
||||||
this.checkBoxAllowPdfReaderToolbar = new System.Windows.Forms.CheckBox();
|
this.checkBoxAllowPdfReaderToolbar = new System.Windows.Forms.CheckBox();
|
||||||
this.checkBoxShowReloadWarningNewWindow = new System.Windows.Forms.CheckBox();
|
this.checkBoxShowReloadWarningNewWindow = new System.Windows.Forms.CheckBox();
|
||||||
this.checkBoxAllowReloadNewWindow = new System.Windows.Forms.CheckBox();
|
this.checkBoxAllowReloadNewWindow = new System.Windows.Forms.CheckBox();
|
||||||
|
@ -440,7 +441,11 @@ namespace SebWindowsConfig
|
||||||
this.editDuplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.editDuplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.configureClientToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.configureClientToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.applyAndStartSEBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.applyAndStartSEBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.checkBoxAllowFind = new System.Windows.Forms.CheckBox();
|
this.groupBox15 = new System.Windows.Forms.GroupBox();
|
||||||
|
this.checkBoxAllowReconfiguration = new System.Windows.Forms.CheckBox();
|
||||||
|
this.label21 = new System.Windows.Forms.Label();
|
||||||
|
this.textBoxReconfigurationUrl = new System.Windows.Forms.TextBox();
|
||||||
|
this.label22 = new System.Windows.Forms.Label();
|
||||||
this.tabPageHookedKeys.SuspendLayout();
|
this.tabPageHookedKeys.SuspendLayout();
|
||||||
this.groupBoxFunctionKeys.SuspendLayout();
|
this.groupBoxFunctionKeys.SuspendLayout();
|
||||||
this.groupBoxSpecialKeys.SuspendLayout();
|
this.groupBoxSpecialKeys.SuspendLayout();
|
||||||
|
@ -495,6 +500,7 @@ namespace SebWindowsConfig
|
||||||
this.groupBoxExitSequence.SuspendLayout();
|
this.groupBoxExitSequence.SuspendLayout();
|
||||||
this.tabControlSebWindowsConfig.SuspendLayout();
|
this.tabControlSebWindowsConfig.SuspendLayout();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
|
this.groupBox15.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// openFileDialogSebConfigFile
|
// openFileDialogSebConfigFile
|
||||||
|
@ -1809,8 +1815,8 @@ namespace SebWindowsConfig
|
||||||
//
|
//
|
||||||
// Type
|
// Type
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle1.BackColor = System.Drawing.Color.Silver;
|
dataGridViewCellStyle7.BackColor = System.Drawing.Color.Silver;
|
||||||
this.Type.DefaultCellStyle = dataGridViewCellStyle1;
|
this.Type.DefaultCellStyle = dataGridViewCellStyle7;
|
||||||
this.Type.HeaderText = "Type";
|
this.Type.HeaderText = "Type";
|
||||||
this.Type.Name = "Type";
|
this.Type.Name = "Type";
|
||||||
this.Type.ReadOnly = true;
|
this.Type.ReadOnly = true;
|
||||||
|
@ -3003,6 +3009,7 @@ namespace SebWindowsConfig
|
||||||
//
|
//
|
||||||
// tabPageExam
|
// tabPageExam
|
||||||
//
|
//
|
||||||
|
this.tabPageExam.Controls.Add(this.groupBox15);
|
||||||
this.tabPageExam.Controls.Add(this.groupBox2);
|
this.tabPageExam.Controls.Add(this.groupBox2);
|
||||||
this.tabPageExam.Controls.Add(this.groupBox9);
|
this.tabPageExam.Controls.Add(this.groupBox9);
|
||||||
this.tabPageExam.Controls.Add(this.groupBox8);
|
this.tabPageExam.Controls.Add(this.groupBox8);
|
||||||
|
@ -3832,6 +3839,17 @@ namespace SebWindowsConfig
|
||||||
this.groupBox11.TabStop = false;
|
this.groupBox11.TabStop = false;
|
||||||
this.groupBox11.Text = "Browser security";
|
this.groupBox11.Text = "Browser security";
|
||||||
//
|
//
|
||||||
|
// checkBoxAllowFind
|
||||||
|
//
|
||||||
|
this.checkBoxAllowFind.AutoSize = true;
|
||||||
|
this.checkBoxAllowFind.Location = new System.Drawing.Point(14, 81);
|
||||||
|
this.checkBoxAllowFind.Name = "checkBoxAllowFind";
|
||||||
|
this.checkBoxAllowFind.Size = new System.Drawing.Size(106, 17);
|
||||||
|
this.checkBoxAllowFind.TabIndex = 15;
|
||||||
|
this.checkBoxAllowFind.Text = "Allow text search";
|
||||||
|
this.checkBoxAllowFind.UseVisualStyleBackColor = true;
|
||||||
|
this.checkBoxAllowFind.CheckedChanged += new System.EventHandler(this.checkBoxAllowFind_CheckedChanged);
|
||||||
|
//
|
||||||
// checkBoxAllowPdfReaderToolbar
|
// checkBoxAllowPdfReaderToolbar
|
||||||
//
|
//
|
||||||
this.checkBoxAllowPdfReaderToolbar.AutoSize = true;
|
this.checkBoxAllowPdfReaderToolbar.AutoSize = true;
|
||||||
|
@ -4329,8 +4347,8 @@ namespace SebWindowsConfig
|
||||||
// spellCheckerDictionaryFilesColumn
|
// spellCheckerDictionaryFilesColumn
|
||||||
//
|
//
|
||||||
this.spellCheckerDictionaryFilesColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
this.spellCheckerDictionaryFilesColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.spellCheckerDictionaryFilesColumn.DefaultCellStyle = dataGridViewCellStyle2;
|
this.spellCheckerDictionaryFilesColumn.DefaultCellStyle = dataGridViewCellStyle8;
|
||||||
this.spellCheckerDictionaryFilesColumn.HeaderText = "Files";
|
this.spellCheckerDictionaryFilesColumn.HeaderText = "Files";
|
||||||
this.spellCheckerDictionaryFilesColumn.Name = "spellCheckerDictionaryFilesColumn";
|
this.spellCheckerDictionaryFilesColumn.Name = "spellCheckerDictionaryFilesColumn";
|
||||||
this.spellCheckerDictionaryFilesColumn.ReadOnly = true;
|
this.spellCheckerDictionaryFilesColumn.ReadOnly = true;
|
||||||
|
@ -5727,16 +5745,54 @@ namespace SebWindowsConfig
|
||||||
this.applyAndStartSEBToolStripMenuItem.Visible = false;
|
this.applyAndStartSEBToolStripMenuItem.Visible = false;
|
||||||
this.applyAndStartSEBToolStripMenuItem.Click += new System.EventHandler(this.applyAndStartSEBToolStripMenuItem_Click);
|
this.applyAndStartSEBToolStripMenuItem.Click += new System.EventHandler(this.applyAndStartSEBToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// checkBoxAllowFind
|
// groupBox15
|
||||||
//
|
//
|
||||||
this.checkBoxAllowFind.AutoSize = true;
|
this.groupBox15.Controls.Add(this.label22);
|
||||||
this.checkBoxAllowFind.Location = new System.Drawing.Point(14, 81);
|
this.groupBox15.Controls.Add(this.textBoxReconfigurationUrl);
|
||||||
this.checkBoxAllowFind.Name = "checkBoxAllowFind";
|
this.groupBox15.Controls.Add(this.label21);
|
||||||
this.checkBoxAllowFind.Size = new System.Drawing.Size(106, 17);
|
this.groupBox15.Controls.Add(this.checkBoxAllowReconfiguration);
|
||||||
this.checkBoxAllowFind.TabIndex = 15;
|
this.groupBox15.Location = new System.Drawing.Point(26, 413);
|
||||||
this.checkBoxAllowFind.Text = "Allow text search";
|
this.groupBox15.Name = "groupBox15";
|
||||||
this.checkBoxAllowFind.UseVisualStyleBackColor = true;
|
this.groupBox15.Size = new System.Drawing.Size(553, 144);
|
||||||
this.checkBoxAllowFind.CheckedChanged += new System.EventHandler(this.checkBoxAllowFind_CheckedChanged);
|
this.groupBox15.TabIndex = 123;
|
||||||
|
this.groupBox15.TabStop = false;
|
||||||
|
this.groupBox15.Text = "Reconfiguring Secure Session";
|
||||||
|
//
|
||||||
|
// checkBoxAllowReconfiguration
|
||||||
|
//
|
||||||
|
this.checkBoxAllowReconfiguration.AutoSize = true;
|
||||||
|
this.checkBoxAllowReconfiguration.Location = new System.Drawing.Point(13, 78);
|
||||||
|
this.checkBoxAllowReconfiguration.Name = "checkBoxAllowReconfiguration";
|
||||||
|
this.checkBoxAllowReconfiguration.Size = new System.Drawing.Size(120, 17);
|
||||||
|
this.checkBoxAllowReconfiguration.TabIndex = 0;
|
||||||
|
this.checkBoxAllowReconfiguration.Text = "Allow Reconfiguring";
|
||||||
|
this.checkBoxAllowReconfiguration.UseVisualStyleBackColor = true;
|
||||||
|
this.checkBoxAllowReconfiguration.CheckedChanged += new System.EventHandler(this.checkBoxAllowReconfiguration_CheckedChanged);
|
||||||
|
//
|
||||||
|
// label21
|
||||||
|
//
|
||||||
|
this.label21.AutoSize = true;
|
||||||
|
this.label21.Location = new System.Drawing.Point(10, 111);
|
||||||
|
this.label21.Name = "label21";
|
||||||
|
this.label21.Size = new System.Drawing.Size(98, 13);
|
||||||
|
this.label21.TabIndex = 1;
|
||||||
|
this.label21.Text = "Reconfiguring URL";
|
||||||
|
//
|
||||||
|
// textBoxReconfigurationUrl
|
||||||
|
//
|
||||||
|
this.textBoxReconfigurationUrl.Location = new System.Drawing.Point(114, 108);
|
||||||
|
this.textBoxReconfigurationUrl.Name = "textBoxReconfigurationUrl";
|
||||||
|
this.textBoxReconfigurationUrl.Size = new System.Drawing.Size(423, 20);
|
||||||
|
this.textBoxReconfigurationUrl.TabIndex = 2;
|
||||||
|
this.textBoxReconfigurationUrl.TextChanged += new System.EventHandler(this.textBoxReconfigurationUrl_TextChanged);
|
||||||
|
//
|
||||||
|
// label22
|
||||||
|
//
|
||||||
|
this.label22.Location = new System.Drawing.Point(10, 26);
|
||||||
|
this.label22.Name = "label22";
|
||||||
|
this.label22.Size = new System.Drawing.Size(527, 43);
|
||||||
|
this.label22.TabIndex = 4;
|
||||||
|
this.label22.Text = resources.GetString("label22.Text");
|
||||||
//
|
//
|
||||||
// SebWindowsConfigForm
|
// SebWindowsConfigForm
|
||||||
//
|
//
|
||||||
|
@ -5855,6 +5911,8 @@ namespace SebWindowsConfig
|
||||||
this.tabControlSebWindowsConfig.ResumeLayout(false);
|
this.tabControlSebWindowsConfig.ResumeLayout(false);
|
||||||
this.menuStrip1.ResumeLayout(false);
|
this.menuStrip1.ResumeLayout(false);
|
||||||
this.menuStrip1.PerformLayout();
|
this.menuStrip1.PerformLayout();
|
||||||
|
this.groupBox15.ResumeLayout(false);
|
||||||
|
this.groupBox15.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -6272,6 +6330,11 @@ namespace SebWindowsConfig
|
||||||
private System.Windows.Forms.GroupBox groupBoxSebService;
|
private System.Windows.Forms.GroupBox groupBoxSebService;
|
||||||
private System.Windows.Forms.CheckBox checkBoxAllowCustomDownloadLocation;
|
private System.Windows.Forms.CheckBox checkBoxAllowCustomDownloadLocation;
|
||||||
private System.Windows.Forms.CheckBox checkBoxAllowFind;
|
private System.Windows.Forms.CheckBox checkBoxAllowFind;
|
||||||
|
private System.Windows.Forms.GroupBox groupBox15;
|
||||||
|
private System.Windows.Forms.TextBox textBoxReconfigurationUrl;
|
||||||
|
private System.Windows.Forms.Label label21;
|
||||||
|
private System.Windows.Forms.CheckBox checkBoxAllowReconfiguration;
|
||||||
|
private System.Windows.Forms.Label label22;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -551,6 +551,8 @@ namespace SebWindowsConfig
|
||||||
checkBoxRestartExamPasswordProtected.Checked = (Boolean)SEBSettings.settingsCurrent[SEBSettings.KeyRestartExamPasswordProtected];
|
checkBoxRestartExamPasswordProtected.Checked = (Boolean)SEBSettings.settingsCurrent[SEBSettings.KeyRestartExamPasswordProtected];
|
||||||
textBoxRestartExamLink.Text = (String)SEBSettings.settingsCurrent[SEBSettings.KeyRestartExamURL];
|
textBoxRestartExamLink.Text = (String)SEBSettings.settingsCurrent[SEBSettings.KeyRestartExamURL];
|
||||||
textBoxRestartExamText.Text = (String)SEBSettings.settingsCurrent[SEBSettings.KeyRestartExamText];
|
textBoxRestartExamText.Text = (String)SEBSettings.settingsCurrent[SEBSettings.KeyRestartExamText];
|
||||||
|
checkBoxAllowReconfiguration.Checked = (Boolean)SEBSettings.settingsCurrent[SEBSettings.KeyAllowReconfiguration];
|
||||||
|
textBoxReconfigurationUrl.Text = (String)SEBSettings.settingsCurrent[SEBSettings.KeyReconfigurationUrl];
|
||||||
|
|
||||||
// Group AdditionalResources
|
// Group AdditionalResources
|
||||||
tabControlSebWindowsConfig.TabPages.Remove(tabPageAdditionalResources);
|
tabControlSebWindowsConfig.TabPages.Remove(tabPageAdditionalResources);
|
||||||
|
@ -4590,5 +4592,15 @@ namespace SebWindowsConfig
|
||||||
{
|
{
|
||||||
SEBSettings.settingsCurrent[SEBSettings.KeyAllowFind] = checkBoxAllowFind.Checked;
|
SEBSettings.settingsCurrent[SEBSettings.KeyAllowFind] = checkBoxAllowFind.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkBoxAllowReconfiguration_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SEBSettings.settingsCurrent[SEBSettings.KeyAllowReconfiguration] = checkBoxAllowReconfiguration.Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBoxReconfigurationUrl_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SEBSettings.settingsCurrent[SEBSettings.KeyReconfigurationUrl] = textBoxReconfigurationUrl.Text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue