Restore SEBPatch
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -31,146 +31,146 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapApplicationBlacklist(AppSettings settings, object value)
|
||||
{
|
||||
if (value is IList<object> applications)
|
||||
{
|
||||
foreach (var item in applications)
|
||||
{
|
||||
if (item is IDictionary<string, object> applicationData)
|
||||
{
|
||||
var isWindowsProcess = applicationData.TryGetValue(Keys.Applications.OperatingSystem, out var v) && v is int os && os == Keys.WINDOWS;
|
||||
//if (value is IList<object> applications)
|
||||
//{
|
||||
// foreach (var item in applications)
|
||||
// {
|
||||
// if (item is IDictionary<string, object> applicationData)
|
||||
// {
|
||||
// var isWindowsProcess = applicationData.TryGetValue(Keys.Applications.OperatingSystem, out var v) && v is int os && os == Keys.WINDOWS;
|
||||
|
||||
if (isWindowsProcess)
|
||||
{
|
||||
var application = new BlacklistApplication();
|
||||
var isActive = applicationData.TryGetValue(Keys.Applications.Active, out v) && v is bool active && active;
|
||||
// if (isWindowsProcess)
|
||||
// {
|
||||
// var application = new BlacklistApplication();
|
||||
// var isActive = applicationData.TryGetValue(Keys.Applications.Active, out v) && v is bool active && active;
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.AutoTerminate, out v) && v is bool autoTerminate)
|
||||
{
|
||||
application.AutoTerminate = autoTerminate;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.AutoTerminate, out v) && v is bool autoTerminate)
|
||||
// {
|
||||
// application.AutoTerminate = autoTerminate;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.ExecutableName, out v) && v is string executableName)
|
||||
{
|
||||
application.ExecutableName = executableName;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.ExecutableName, out v) && v is string executableName)
|
||||
// {
|
||||
// application.ExecutableName = executableName;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.OriginalName, out v) && v is string originalName)
|
||||
{
|
||||
application.OriginalName = originalName;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.OriginalName, out v) && v is string originalName)
|
||||
// {
|
||||
// application.OriginalName = originalName;
|
||||
// }
|
||||
|
||||
var defaultEntry = settings.Applications.Blacklist.FirstOrDefault(a =>
|
||||
{
|
||||
return a.ExecutableName?.Equals(application.ExecutableName, StringComparison.OrdinalIgnoreCase) == true
|
||||
&& a.OriginalName?.Equals(application.OriginalName, StringComparison.OrdinalIgnoreCase) == true;
|
||||
});
|
||||
// var defaultEntry = settings.Applications.Blacklist.FirstOrDefault(a =>
|
||||
// {
|
||||
// return a.ExecutableName?.Equals(application.ExecutableName, StringComparison.OrdinalIgnoreCase) == true
|
||||
// && a.OriginalName?.Equals(application.OriginalName, StringComparison.OrdinalIgnoreCase) == true;
|
||||
// });
|
||||
|
||||
if (defaultEntry != default(BlacklistApplication))
|
||||
{
|
||||
settings.Applications.Blacklist.Remove(defaultEntry);
|
||||
}
|
||||
// if (defaultEntry != default(BlacklistApplication))
|
||||
// {
|
||||
// settings.Applications.Blacklist.Remove(defaultEntry);
|
||||
// }
|
||||
|
||||
if (isActive)
|
||||
{
|
||||
settings.Applications.Blacklist.Add(application);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (isActive)
|
||||
// {
|
||||
// settings.Applications.Blacklist.Add(application);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
private void MapApplicationWhitelist(AppSettings settings, object value)
|
||||
{
|
||||
if (value is IList<object> applications)
|
||||
{
|
||||
foreach (var item in applications)
|
||||
{
|
||||
if (item is IDictionary<string, object> applicationData)
|
||||
{
|
||||
var isActive = applicationData.TryGetValue(Keys.Applications.Active, out var v) && v is bool active && active;
|
||||
var isWindowsProcess = applicationData.TryGetValue(Keys.Applications.OperatingSystem, out v) && v is int os && os == Keys.WINDOWS;
|
||||
//if (value is IList<object> applications)
|
||||
//{
|
||||
// foreach (var item in applications)
|
||||
// {
|
||||
// if (item is IDictionary<string, object> applicationData)
|
||||
// {
|
||||
// var isActive = applicationData.TryGetValue(Keys.Applications.Active, out var v) && v is bool active && active;
|
||||
// var isWindowsProcess = applicationData.TryGetValue(Keys.Applications.OperatingSystem, out v) && v is int os && os == Keys.WINDOWS;
|
||||
|
||||
if (isActive && isWindowsProcess)
|
||||
{
|
||||
var application = new WhitelistApplication();
|
||||
// if (isActive && isWindowsProcess)
|
||||
// {
|
||||
// var application = new WhitelistApplication();
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.AllowCustomPath, out v) && v is bool allowCustomPath)
|
||||
{
|
||||
application.AllowCustomPath = allowCustomPath;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.AllowCustomPath, out v) && v is bool allowCustomPath)
|
||||
// {
|
||||
// application.AllowCustomPath = allowCustomPath;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.AllowRunning, out v) && v is bool allowRunning)
|
||||
{
|
||||
application.AllowRunning = allowRunning;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.AllowRunning, out v) && v is bool allowRunning)
|
||||
// {
|
||||
// application.AllowRunning = allowRunning;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.Arguments, out v) && v is IList<object> arguments)
|
||||
{
|
||||
foreach (var argumentItem in arguments)
|
||||
{
|
||||
if (argumentItem is IDictionary<string, object> argumentData)
|
||||
{
|
||||
var argActive = argumentData.TryGetValue(Keys.Applications.Active, out v) && v is bool a && a;
|
||||
// if (applicationData.TryGetValue(Keys.Applications.Arguments, out v) && v is IList<object> arguments)
|
||||
// {
|
||||
// foreach (var argumentItem in arguments)
|
||||
// {
|
||||
// if (argumentItem is IDictionary<string, object> argumentData)
|
||||
// {
|
||||
// var argActive = argumentData.TryGetValue(Keys.Applications.Active, out v) && v is bool a && a;
|
||||
|
||||
if (argActive && argumentData.TryGetValue(Keys.Applications.Argument, out v) && v is string argument)
|
||||
{
|
||||
application.Arguments.Add(argument);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (argActive && argumentData.TryGetValue(Keys.Applications.Argument, out v) && v is string argument)
|
||||
// {
|
||||
// application.Arguments.Add(argument);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.AutoStart, out v) && v is bool autoStart)
|
||||
{
|
||||
application.AutoStart = autoStart;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.AutoStart, out v) && v is bool autoStart)
|
||||
// {
|
||||
// application.AutoStart = autoStart;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.AutoTerminate, out v) && v is bool autoTerminate)
|
||||
{
|
||||
application.AutoTerminate = autoTerminate;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.AutoTerminate, out v) && v is bool autoTerminate)
|
||||
// {
|
||||
// application.AutoTerminate = autoTerminate;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.Description, out v) && v is string description)
|
||||
{
|
||||
application.Description = description;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.Description, out v) && v is string description)
|
||||
// {
|
||||
// application.Description = description;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.DisplayName, out v) && v is string displayName)
|
||||
{
|
||||
application.DisplayName = displayName;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.DisplayName, out v) && v is string displayName)
|
||||
// {
|
||||
// application.DisplayName = displayName;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.ExecutableName, out v) && v is string executableName)
|
||||
{
|
||||
application.ExecutableName = executableName;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.ExecutableName, out v) && v is string executableName)
|
||||
// {
|
||||
// application.ExecutableName = executableName;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.ExecutablePath, out v) && v is string executablePath)
|
||||
{
|
||||
application.ExecutablePath = executablePath;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.ExecutablePath, out v) && v is string executablePath)
|
||||
// {
|
||||
// application.ExecutablePath = executablePath;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.OriginalName, out v) && v is string originalName)
|
||||
{
|
||||
application.OriginalName = originalName;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.OriginalName, out v) && v is string originalName)
|
||||
// {
|
||||
// application.OriginalName = originalName;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.ShowInShell, out v) && v is bool showInShell)
|
||||
{
|
||||
application.ShowInShell = showInShell;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.ShowInShell, out v) && v is bool showInShell)
|
||||
// {
|
||||
// application.ShowInShell = showInShell;
|
||||
// }
|
||||
|
||||
if (applicationData.TryGetValue(Keys.Applications.Signature, out v) && v is string signature)
|
||||
{
|
||||
application.Signature = signature;
|
||||
}
|
||||
// if (applicationData.TryGetValue(Keys.Applications.Signature, out v) && v is string signature)
|
||||
// {
|
||||
// application.Signature = signature;
|
||||
// }
|
||||
|
||||
settings.Applications.Whitelist.Add(application);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// settings.Applications.Whitelist.Add(application);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -17,7 +17,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
{
|
||||
internal class BrowserDataMapper : BaseDataMapper
|
||||
{
|
||||
public static bool allow = true;
|
||||
internal override void Map(string key, object value, AppSettings settings)
|
||||
{
|
||||
switch (key)
|
||||
@@ -183,7 +182,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
internal override void MapGlobal(IDictionary<string, object> rawData, AppSettings settings)
|
||||
{
|
||||
MapLegacyDownUploadSetting(rawData, settings);
|
||||
MapPopupPolicy(rawData, settings);
|
||||
MapRequestFilter(rawData, settings);
|
||||
MapUserAgentMode(rawData, settings);
|
||||
@@ -191,184 +189,152 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapAllowAddressBar(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.MainWindow.AllowAddressBar = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.MainWindow.AllowAddressBar = allow;
|
||||
//settings.Browser.MainWindow.AllowAddressBar = false;
|
||||
}
|
||||
|
||||
private void MapAllowAddressBarAdditionalWindow(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AdditionalWindow.AllowAddressBar = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AdditionalWindow.AllowAddressBar = allow;
|
||||
//settings.Browser.AdditionalWindow.AllowAddressBar = false;
|
||||
}
|
||||
|
||||
private void MapAllowConfigurationDownloads(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowConfigurationDownloads = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowConfigurationDownloads = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowConfigurationDownloads = allow;
|
||||
//}
|
||||
settings.Browser.AllowConfigurationDownloads = true;
|
||||
}
|
||||
|
||||
private void MapAllowCustomDownloadLocation(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowCustomDownAndUploadLocation = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowCustomDownAndUploadLocation = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowCustomDownAndUploadLocation = allow;
|
||||
//}
|
||||
settings.Browser.AllowCustomDownAndUploadLocation = true;
|
||||
}
|
||||
|
||||
private void MapAllowDeveloperConsole(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.MainWindow.AllowDeveloperConsole = allow;
|
||||
settings.Browser.AdditionalWindow.AllowDeveloperConsole = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.MainWindow.AllowDeveloperConsole = allow;
|
||||
settings.Browser.AdditionalWindow.AllowDeveloperConsole = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.MainWindow.AllowDeveloperConsole = allow;
|
||||
// settings.Browser.AdditionalWindow.AllowDeveloperConsole = allow;
|
||||
//}
|
||||
settings.Browser.MainWindow.AllowDeveloperConsole = true;
|
||||
settings.Browser.AdditionalWindow.AllowDeveloperConsole = true;
|
||||
}
|
||||
|
||||
private void MapAllowDownloads(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowDownloads = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowDownloads = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowDownloads = allow;
|
||||
//}
|
||||
settings.Browser.AllowDownloads = true;
|
||||
}
|
||||
|
||||
private void MapAllowFind(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowFind = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowFind = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowFind = allow;
|
||||
//}
|
||||
settings.Browser.AllowFind = true;
|
||||
}
|
||||
|
||||
private void MapAllowNavigation(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.MainWindow.AllowBackwardNavigation = allow;
|
||||
settings.Browser.MainWindow.AllowForwardNavigation = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.MainWindow.AllowBackwardNavigation = allow;
|
||||
settings.Browser.MainWindow.AllowForwardNavigation = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.MainWindow.AllowBackwardNavigation = allow;
|
||||
// settings.Browser.MainWindow.AllowForwardNavigation = allow;
|
||||
//}
|
||||
settings.Browser.MainWindow.AllowBackwardNavigation = true;
|
||||
settings.Browser.MainWindow.AllowForwardNavigation = true;
|
||||
}
|
||||
|
||||
private void MapAllowNavigationAdditionalWindow(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AdditionalWindow.AllowBackwardNavigation = allow;
|
||||
settings.Browser.AdditionalWindow.AllowForwardNavigation = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AdditionalWindow.AllowBackwardNavigation = allow;
|
||||
settings.Browser.AdditionalWindow.AllowForwardNavigation = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AdditionalWindow.AllowBackwardNavigation = allow;
|
||||
// settings.Browser.AdditionalWindow.AllowForwardNavigation = allow;
|
||||
//}
|
||||
settings.Browser.AdditionalWindow.AllowBackwardNavigation = true;
|
||||
settings.Browser.AdditionalWindow.AllowForwardNavigation = true;
|
||||
}
|
||||
|
||||
private void MapAllowPageZoom(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowPageZoom = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowPageZoom = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowPageZoom = allow;
|
||||
//}
|
||||
settings.Browser.AllowPageZoom = true;
|
||||
}
|
||||
|
||||
private void MapAllowPdfReaderToolbar(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowPdfReaderToolbar = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowPdfReaderToolbar = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowPdfReaderToolbar = allow;
|
||||
//}
|
||||
settings.Browser.AllowPdfReaderToolbar = true;
|
||||
}
|
||||
|
||||
private void MapAllowPrint(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowPrint = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowPrint = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowPrint = allow;
|
||||
//}
|
||||
settings.Browser.AllowPrint = true;
|
||||
}
|
||||
|
||||
private void MapAllowReload(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.MainWindow.AllowReloading = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.MainWindow.AllowReloading = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.MainWindow.AllowReloading = allow;
|
||||
//}
|
||||
settings.Browser.MainWindow.AllowReloading = true;
|
||||
}
|
||||
|
||||
private void MapAllowReloadAdditionalWindow(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AdditionalWindow.AllowReloading = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AdditionalWindow.AllowReloading = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AdditionalWindow.AllowReloading = allow;
|
||||
//}
|
||||
settings.Browser.AdditionalWindow.AllowReloading = true;
|
||||
}
|
||||
|
||||
private void MapAllowSpellChecking(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowSpellChecking = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowSpellChecking = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowSpellChecking = allow;
|
||||
//}
|
||||
settings.Browser.AllowSpellChecking = true;
|
||||
}
|
||||
|
||||
private void MapAllowUploads(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowUploads = allow;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AllowUploads = allow;
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Browser.AllowUploads = allow;
|
||||
//}
|
||||
settings.Browser.AllowUploads = true;
|
||||
}
|
||||
|
||||
private void MapDeleteCacheOnShutdown(AppSettings settings, object value)
|
||||
@@ -413,10 +379,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapEnableBrowser(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Browser.EnableBrowser = enable;
|
||||
}
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Browser.EnableBrowser = enable;
|
||||
//}
|
||||
settings.Browser.EnableBrowser = true;
|
||||
}
|
||||
|
||||
private void MapExamKeySalt(AppSettings settings, object value)
|
||||
@@ -437,50 +404,39 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapHomeButtonRequiresPassword(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool requires)
|
||||
{
|
||||
settings.Browser.HomeNavigationRequiresPassword = requires;
|
||||
}
|
||||
*/
|
||||
//if (value is bool requires)
|
||||
//{
|
||||
// settings.Browser.HomeNavigationRequiresPassword = requires;
|
||||
//}
|
||||
settings.Browser.HomeNavigationRequiresPassword = false;
|
||||
}
|
||||
|
||||
private void MapHomeButtonUrl(AppSettings settings, object value)
|
||||
{
|
||||
if (value is string url)
|
||||
{
|
||||
settings.Browser.HomeUrl = url;
|
||||
}
|
||||
//if (value is string url)
|
||||
//{
|
||||
// settings.Browser.HomeUrl = url;
|
||||
//}
|
||||
settings.Browser.HomeUrl = "https://google.com";
|
||||
}
|
||||
|
||||
private void MapHomeButtonUseStartUrl(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool use)
|
||||
{
|
||||
settings.Browser.UseStartUrlAsHomeUrl = use;
|
||||
}
|
||||
}
|
||||
|
||||
private void MapLegacyDownUploadSetting(IDictionary<string, object> rawData, AppSettings settings)
|
||||
{
|
||||
if (rawData.TryGetValue(Keys.Browser.AllowDownloadsAndUploads, out var value) && value is bool allow)
|
||||
{
|
||||
settings.Browser.AllowDownloads &= allow;
|
||||
settings.Browser.AllowUploads &= allow;
|
||||
}
|
||||
//if (value is bool use)
|
||||
//{
|
||||
// settings.Browser.UseStartUrlAsHomeUrl = use;
|
||||
//}
|
||||
settings.Browser.UseStartUrlAsHomeUrl = false;
|
||||
}
|
||||
|
||||
private void MapMainWindowMode(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
const int FULLSCREEN = 1;
|
||||
//const int FULLSCREEN = 1;
|
||||
|
||||
if (value is int mode)
|
||||
{
|
||||
settings.Browser.MainWindow.FullScreenMode = mode == FULLSCREEN;
|
||||
}
|
||||
*/
|
||||
//if (value is int mode)
|
||||
//{
|
||||
// settings.Browser.MainWindow.FullScreenMode = mode == FULLSCREEN;
|
||||
//}
|
||||
settings.Browser.MainWindow.FullScreenMode = false;
|
||||
}
|
||||
|
||||
@@ -533,15 +489,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapShowReloadButton(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool show)
|
||||
{
|
||||
settings.Browser.AdditionalWindow.ShowReloadButton = show;
|
||||
settings.Browser.MainWindow.ShowReloadButton = show;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AdditionalWindow.ShowReloadButton = allow;
|
||||
settings.Browser.MainWindow.ShowReloadButton = allow;
|
||||
//if (value is bool show)
|
||||
//{
|
||||
// settings.Browser.AdditionalWindow.ShowReloadButton = show;
|
||||
// settings.Browser.MainWindow.ShowReloadButton = show;
|
||||
//}
|
||||
settings.Browser.AdditionalWindow.ShowReloadButton = true;
|
||||
settings.Browser.MainWindow.ShowReloadButton = true;
|
||||
}
|
||||
|
||||
private void MapRequestFilter(IDictionary<string, object> rawData, AppSettings settings)
|
||||
@@ -572,10 +526,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapShowFileSystemElementPath(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool show)
|
||||
{
|
||||
settings.Browser.ShowFileSystemElementPath = show;
|
||||
}
|
||||
//if (value is bool show)
|
||||
//{
|
||||
// settings.Browser.ShowFileSystemElementPath = show;
|
||||
//}
|
||||
settings.Browser.ShowFileSystemElementPath = true;
|
||||
}
|
||||
|
||||
private void MapShowReloadWarningAdditionalWindow(AppSettings settings, object value)
|
||||
@@ -588,15 +543,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapShowToolbar(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool show)
|
||||
{
|
||||
settings.Browser.AdditionalWindow.ShowToolbar = show;
|
||||
settings.Browser.MainWindow.ShowToolbar = show;
|
||||
}
|
||||
*/
|
||||
settings.Browser.AdditionalWindow.ShowToolbar = allow;
|
||||
settings.Browser.MainWindow.ShowToolbar = allow;
|
||||
//if (value is bool show)
|
||||
//{
|
||||
// settings.Browser.AdditionalWindow.ShowToolbar = show;
|
||||
// settings.Browser.MainWindow.ShowToolbar = show;
|
||||
//}
|
||||
settings.Browser.AdditionalWindow.ShowToolbar = true;
|
||||
settings.Browser.MainWindow.ShowToolbar = true;
|
||||
}
|
||||
|
||||
private void MapStartUrl(AppSettings settings, object value)
|
||||
@@ -671,15 +624,16 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapUseTemporaryDownUploadDirectory(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool use)
|
||||
{
|
||||
settings.Browser.UseTemporaryDownAndUploadDirectory = use;
|
||||
}
|
||||
//if (value is bool use)
|
||||
//{
|
||||
// settings.Browser.UseTemporaryDownAndUploadDirectory = use;
|
||||
//}
|
||||
settings.Browser.UseTemporaryDownAndUploadDirectory = false;
|
||||
}
|
||||
|
||||
private void MapFilterRules(AppSettings settings, object value)
|
||||
{
|
||||
const int ALLOW = 1;
|
||||
//const int ALLOW = 1;
|
||||
|
||||
if (value is IList<object> ruleDataList)
|
||||
{
|
||||
@@ -700,7 +654,8 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
if (ruleData.TryGetValue(Keys.Browser.Filter.RuleAction, out v) && v is int action)
|
||||
{
|
||||
rule.Result = action == ALLOW ? FilterResult.Allow : FilterResult.Block;
|
||||
//rule.Result = action == ALLOW ? FilterResult.Allow : FilterResult.Block;
|
||||
rule.Result = FilterResult.Allow;
|
||||
}
|
||||
|
||||
if (ruleData.TryGetValue(Keys.Browser.Filter.RuleExpressionIsRegex, out v) && v is bool regex)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -33,12 +33,10 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapAllowedDisplays(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is int count)
|
||||
{
|
||||
settings.Display.AllowedDisplays = count;
|
||||
}
|
||||
*/
|
||||
//if (value is int count)
|
||||
//{
|
||||
// settings.Display.AllowedDisplays = count;
|
||||
//}
|
||||
settings.Display.AllowedDisplays = 500;
|
||||
}
|
||||
|
||||
@@ -52,23 +50,19 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapIgnoreError(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool ignore)
|
||||
{
|
||||
settings.Display.IgnoreError = ignore;
|
||||
}
|
||||
*/
|
||||
//if (value is bool ignore)
|
||||
//{
|
||||
// settings.Display.IgnoreError = ignore;
|
||||
//}
|
||||
settings.Display.IgnoreError = true;
|
||||
}
|
||||
|
||||
private void MapInternalDisplayOnly(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool internalOnly)
|
||||
{
|
||||
settings.Display.InternalDisplayOnly = internalOnly;
|
||||
}
|
||||
*/
|
||||
//if (value is bool internalOnly)
|
||||
//{
|
||||
// settings.Display.InternalDisplayOnly = internalOnly;
|
||||
//}
|
||||
settings.Display.InternalDisplayOnly = false;
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -25,12 +25,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapLogLevel(AppSettings settings, object value)
|
||||
{
|
||||
const int ERROR = 0, WARNING = 1, INFO = 2;
|
||||
//const int ERROR = 0, WARNING = 1, INFO = 2;
|
||||
|
||||
if (value is int level)
|
||||
{
|
||||
settings.LogLevel = level == ERROR ? LogLevel.Error : (level == WARNING ? LogLevel.Warning : (level == INFO ? LogLevel.Info : LogLevel.Debug));
|
||||
}
|
||||
//if (value is int level)
|
||||
//{
|
||||
// settings.LogLevel = level == ERROR ? LogLevel.Error : (level == WARNING ? LogLevel.Warning : (level == INFO ? LogLevel.Info : LogLevel.Debug));
|
||||
//}
|
||||
const int ERROR = 0;
|
||||
settings.LogLevel = ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -12,6 +12,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
{
|
||||
internal class InputDataMapper : BaseDataMapper
|
||||
{
|
||||
public static bool enabled = true; //Simplify my life
|
||||
internal override void Map(string key, object value, AppSettings settings)
|
||||
{
|
||||
switch (key)
|
||||
@@ -84,233 +85,191 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapEnableAltEsc(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowAltEsc = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowAltEsc = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowAltEsc = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowAltEsc = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableAltF4(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowAltF4 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowAltF4 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowAltF4 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowAltF4 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableAltTab(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowAltTab = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowAltTab = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowAltTab = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowAltTab = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableCtrlEsc(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowCtrlEsc = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowCtrlEsc = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowCtrlEsc = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowCtrlEsc = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableEsc(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowEsc = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowEsc = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowEsc = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowEsc = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF1(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF1 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF1 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF1 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF1 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF2(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF2 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF2 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF2 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF2 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF3(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF3 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF3 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF3 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF3 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF4(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF4 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF4 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF4 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF4 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF5(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF5 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF5 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF5 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF5 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF6(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF6 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF6 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF6 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF6 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF7(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF7 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF7 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF7 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF7 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF8(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF8 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF8 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF8 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF8 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF9(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF9 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF9 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF9 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF9 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF10(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF10 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF10 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF10 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF10 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF11(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF11 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF11 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF11 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF11 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableF12(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowF12 = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowF12 = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowF12 = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowF12 = enabled;
|
||||
}
|
||||
|
||||
private void MapEnablePrintScreen(AppSettings settings, object value)
|
||||
{
|
||||
settings.Keyboard.AllowPrintScreen = true;
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowPrintScreen = enabled;
|
||||
}
|
||||
*/
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowPrintScreen = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowPrintScreen = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableSystemKey(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Keyboard.AllowSystemKey = enabled;
|
||||
}
|
||||
*/
|
||||
settings.Keyboard.AllowSystemKey = true;
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Keyboard.AllowSystemKey = enabled;
|
||||
//}
|
||||
settings.Keyboard.AllowSystemKey = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableMiddleMouseButton(AppSettings settings, object value)
|
||||
{
|
||||
settings.Mouse.AllowMiddleButton = true;
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Mouse.AllowMiddleButton = enabled;
|
||||
}
|
||||
*/
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Mouse.AllowMiddleButton = enabled;
|
||||
//}
|
||||
settings.Mouse.AllowMiddleButton = enabled;
|
||||
}
|
||||
|
||||
private void MapEnableRightMouseButton(AppSettings settings, object value)
|
||||
{
|
||||
settings.Mouse.AllowRightButton = true;
|
||||
/*
|
||||
if (value is bool enabled)
|
||||
{
|
||||
settings.Mouse.AllowRightButton = enabled;
|
||||
}
|
||||
*/
|
||||
//if (value is bool enabled)
|
||||
//{
|
||||
// settings.Mouse.AllowRightButton = enabled;
|
||||
//}
|
||||
settings.Mouse.AllowRightButton = enabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -21,6 +21,9 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
case Keys.Proctoring.ForceRaiseHandMessage:
|
||||
MapForceRaiseHandMessage(settings, value);
|
||||
break;
|
||||
case Keys.Proctoring.ScreenProctoring.CacheSize:
|
||||
MapCacheSize(settings, value);
|
||||
break;
|
||||
case Keys.Proctoring.ScreenProctoring.ClientId:
|
||||
MapClientId(settings, value);
|
||||
break;
|
||||
@@ -42,8 +45,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
case Keys.Proctoring.ScreenProctoring.ImageQuantization:
|
||||
MapImageQuantization(settings, value);
|
||||
break;
|
||||
case Keys.Proctoring.ScreenProctoring.MaxInterval:
|
||||
MapMaxInterval(settings, value);
|
||||
case Keys.Proctoring.ScreenProctoring.IntervalMaximum:
|
||||
MapIntervalMaximum(settings, value);
|
||||
break;
|
||||
case Keys.Proctoring.ScreenProctoring.IntervalMinimum:
|
||||
MapIntervalMinimum(settings, value);
|
||||
break;
|
||||
case Keys.Proctoring.ScreenProctoring.MetaData.CaptureApplicationData:
|
||||
MapCaptureApplicationData(settings, value);
|
||||
@@ -54,9 +60,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
case Keys.Proctoring.ScreenProctoring.MetaData.CaptureWindowTitle:
|
||||
MapCaptureWindowTitle(settings, value);
|
||||
break;
|
||||
case Keys.Proctoring.ScreenProctoring.MinInterval:
|
||||
MapMinInterval(settings, value);
|
||||
break;
|
||||
case Keys.Proctoring.ScreenProctoring.ServiceUrl:
|
||||
MapServiceUrl(settings, value);
|
||||
break;
|
||||
@@ -77,6 +80,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
}
|
||||
}
|
||||
|
||||
private void MapCacheSize(AppSettings settings, object value)
|
||||
{
|
||||
if (value is int size)
|
||||
{
|
||||
settings.Proctoring.ScreenProctoring.CacheSize = size;
|
||||
}
|
||||
}
|
||||
|
||||
private void MapCaptureApplicationData(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool capture)
|
||||
@@ -173,19 +184,19 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
}
|
||||
}
|
||||
|
||||
private void MapMaxInterval(AppSettings settings, object value)
|
||||
private void MapIntervalMaximum(AppSettings settings, object value)
|
||||
{
|
||||
if (value is int interval)
|
||||
{
|
||||
settings.Proctoring.ScreenProctoring.MaxInterval = interval;
|
||||
settings.Proctoring.ScreenProctoring.IntervalMaximum = interval;
|
||||
}
|
||||
}
|
||||
|
||||
private void MapMinInterval(AppSettings settings, object value)
|
||||
private void MapIntervalMinimum(AppSettings settings, object value)
|
||||
{
|
||||
if (value is int interval)
|
||||
{
|
||||
settings.Proctoring.ScreenProctoring.MinInterval = interval;
|
||||
settings.Proctoring.ScreenProctoring.IntervalMinimum = interval;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -67,12 +67,10 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapAdminPasswordHash(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is string hash)
|
||||
{
|
||||
settings.Security.AdminPasswordHash = hash;
|
||||
}
|
||||
*/
|
||||
//if (value is string hash)
|
||||
//{
|
||||
// settings.Security.AdminPasswordHash = hash;
|
||||
//}
|
||||
settings.Security.AdminPasswordHash = "";
|
||||
}
|
||||
|
||||
@@ -87,29 +85,24 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapAllowStickyKeys(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Security.AllowStickyKeys = allow;
|
||||
}
|
||||
*/
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Security.AllowStickyKeys = allow;
|
||||
//}
|
||||
settings.Security.AllowStickyKeys = true;
|
||||
}
|
||||
|
||||
private void MapAllowTermination(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Security.AllowTermination = allow;
|
||||
}
|
||||
*/
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Security.AllowTermination = allow;
|
||||
//}
|
||||
settings.Security.AllowTermination = true;
|
||||
}
|
||||
|
||||
private void MapApplicationLogAccess(IDictionary<string, object> rawData, AppSettings settings)
|
||||
{
|
||||
/*
|
||||
var hasValue = rawData.TryGetValue(Keys.Security.AllowApplicationLog, out var value);
|
||||
|
||||
if (hasValue && value is bool allow)
|
||||
@@ -126,138 +119,123 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
settings.UserInterface.ActionCenter.ShowApplicationLog = false;
|
||||
settings.UserInterface.Taskbar.ShowApplicationLog = false;
|
||||
}
|
||||
*/
|
||||
settings.UserInterface.ActionCenter.ShowApplicationLog = false;
|
||||
settings.UserInterface.Taskbar.ShowApplicationLog = false;
|
||||
}
|
||||
|
||||
private void MapKioskMode(IDictionary<string, object> rawData, AppSettings settings)
|
||||
{
|
||||
/*
|
||||
var hasCreateNewDesktop = rawData.TryGetValue(Keys.Security.KioskModeCreateNewDesktop, out var createNewDesktop);
|
||||
var hasDisableExplorerShell = rawData.TryGetValue(Keys.Security.KioskModeDisableExplorerShell, out var disableExplorerShell);
|
||||
//var hasCreateNewDesktop = rawData.TryGetValue(Keys.Security.KioskModeCreateNewDesktop, out var createNewDesktop);
|
||||
//var hasDisableExplorerShell = rawData.TryGetValue(Keys.Security.KioskModeDisableExplorerShell, out var disableExplorerShell);
|
||||
|
||||
if (hasDisableExplorerShell && disableExplorerShell as bool? == true)
|
||||
{
|
||||
settings.Security.KioskMode = KioskMode.DisableExplorerShell;
|
||||
}
|
||||
//if (hasDisableExplorerShell && disableExplorerShell as bool? == true)
|
||||
//{
|
||||
// settings.Security.KioskMode = KioskMode.DisableExplorerShell;
|
||||
//}
|
||||
|
||||
if (hasCreateNewDesktop && createNewDesktop as bool? == true)
|
||||
{
|
||||
settings.Security.KioskMode = KioskMode.CreateNewDesktop;
|
||||
}
|
||||
//if (hasCreateNewDesktop && createNewDesktop as bool? == true)
|
||||
//{
|
||||
// settings.Security.KioskMode = KioskMode.CreateNewDesktop;
|
||||
//}
|
||||
|
||||
if (hasCreateNewDesktop && hasDisableExplorerShell && createNewDesktop as bool? == false && disableExplorerShell as bool? == false)
|
||||
{
|
||||
settings.Security.KioskMode = KioskMode.None;
|
||||
}
|
||||
*/
|
||||
//if (hasCreateNewDesktop && hasDisableExplorerShell && createNewDesktop as bool? == false && disableExplorerShell as bool? == false)
|
||||
//{
|
||||
// settings.Security.KioskMode = KioskMode.None;
|
||||
//}
|
||||
settings.Security.KioskMode = KioskMode.None;
|
||||
}
|
||||
|
||||
private void MapQuitPasswordHash(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is string hash)
|
||||
{
|
||||
settings.Security.QuitPasswordHash = hash;
|
||||
}
|
||||
*/
|
||||
//if (value is string hash)
|
||||
//{
|
||||
// settings.Security.QuitPasswordHash = hash;
|
||||
//}
|
||||
settings.Security.QuitPasswordHash = "";
|
||||
}
|
||||
|
||||
private void MapClipboardPolicy(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
const int ALLOW = 0;
|
||||
const int BLOCK = 1;
|
||||
//const int ALLOW = 0;
|
||||
//const int BLOCK = 1;
|
||||
|
||||
if (value is int policy)
|
||||
{
|
||||
settings.Security.ClipboardPolicy = policy == ALLOW ? ClipboardPolicy.Allow : (policy == BLOCK ? ClipboardPolicy.Block : ClipboardPolicy.Isolated);
|
||||
}
|
||||
*/
|
||||
//if (value is int policy)
|
||||
//{
|
||||
// settings.Security.ClipboardPolicy = policy == ALLOW ? ClipboardPolicy.Allow : (policy == BLOCK ? ClipboardPolicy.Block : ClipboardPolicy.Isolated);
|
||||
//}
|
||||
settings.Security.ClipboardPolicy = ClipboardPolicy.Allow;
|
||||
}
|
||||
|
||||
private void MapDisableSessionChangeLockScreen(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool disable)
|
||||
{
|
||||
settings.Security.DisableSessionChangeLockScreen = disable;
|
||||
}
|
||||
//if (value is bool disable)
|
||||
//{
|
||||
// settings.Security.DisableSessionChangeLockScreen = disable;
|
||||
//}
|
||||
settings.Security.DisableSessionChangeLockScreen = false;
|
||||
}
|
||||
|
||||
private void MapVirtualMachinePolicy(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool allow)
|
||||
{
|
||||
settings.Security.VirtualMachinePolicy = allow ? VirtualMachinePolicy.Allow : VirtualMachinePolicy.Deny;
|
||||
}
|
||||
*/
|
||||
//if (value is bool allow)
|
||||
//{
|
||||
// settings.Security.VirtualMachinePolicy = allow ? VirtualMachinePolicy.Allow : VirtualMachinePolicy.Deny;
|
||||
//}
|
||||
settings.Security.VirtualMachinePolicy = VirtualMachinePolicy.Allow;
|
||||
}
|
||||
|
||||
private void MapReconfigurationUrl(AppSettings settings, object value)
|
||||
{
|
||||
//if (value is string url)
|
||||
//{
|
||||
// settings.Security.ReconfigurationUrl = url;
|
||||
//}
|
||||
settings.Security.ReconfigurationUrl = "*";
|
||||
if (value is string url)
|
||||
{
|
||||
settings.Security.ReconfigurationUrl = url;
|
||||
}
|
||||
}
|
||||
|
||||
private void MapVerifyCursorConfiguration(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool verify)
|
||||
{
|
||||
settings.Security.VerifyCursorConfiguration = verify;
|
||||
}
|
||||
*/
|
||||
//if (value is bool verify)
|
||||
//{
|
||||
// settings.Security.VerifyCursorConfiguration = verify;
|
||||
//}
|
||||
settings.Security.VerifyCursorConfiguration = false;
|
||||
}
|
||||
|
||||
private void MapVerifySessionIntegrity(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool verify)
|
||||
{
|
||||
settings.Security.VerifySessionIntegrity = verify;
|
||||
}
|
||||
*/
|
||||
//if (value is bool verify)
|
||||
//{
|
||||
// settings.Security.VerifySessionIntegrity = verify;
|
||||
//}
|
||||
settings.Security.VerifySessionIntegrity = false;
|
||||
}
|
||||
|
||||
private void MapVersionRestrictions(AppSettings settings, object value)
|
||||
{
|
||||
if (value is IList<object> restrictions)
|
||||
{
|
||||
foreach (var restriction in restrictions.Cast<string>())
|
||||
{
|
||||
var parts = restriction.Split('.');
|
||||
var os = parts.Length > 0 ? parts[0] : default;
|
||||
//if (value is IList<object> restrictions)
|
||||
//{
|
||||
// foreach (var restriction in restrictions.Cast<string>())
|
||||
// {
|
||||
// var parts = restriction.Split('.');
|
||||
// var os = parts.Length > 0 ? parts[0] : default;
|
||||
|
||||
if (os?.Equals("win", StringComparison.OrdinalIgnoreCase) == true)
|
||||
{
|
||||
var major = parts.Length > 1 ? int.Parse(parts[1]) : default;
|
||||
var minor = parts.Length > 2 ? int.Parse(parts[2]) : default;
|
||||
var patch = parts.Length > 3 && int.TryParse(parts[3], out _) ? int.Parse(parts[3]) : default(int?);
|
||||
var build = parts.Length > 4 && int.TryParse(parts[4], out _) ? int.Parse(parts[4]) : default(int?);
|
||||
// if (os?.Equals("win", StringComparison.OrdinalIgnoreCase) == true)
|
||||
// {
|
||||
// var major = parts.Length > 1 ? int.Parse(parts[1]) : default;
|
||||
// var minor = parts.Length > 2 ? int.Parse(parts[2]) : default;
|
||||
// var patch = parts.Length > 3 && int.TryParse(parts[3], out _) ? int.Parse(parts[3]) : default(int?);
|
||||
// var build = parts.Length > 4 && int.TryParse(parts[4], out _) ? int.Parse(parts[4]) : default(int?);
|
||||
|
||||
//settings.Security.VersionRestrictions.Add(new VersionRestriction
|
||||
//{
|
||||
// Major = major,
|
||||
// Minor = minor,
|
||||
// Patch = patch,
|
||||
// Build = build,
|
||||
// IsMinimumRestriction = restriction.Contains("min"),
|
||||
// RequiresAllianceEdition = restriction.Contains("AE")
|
||||
//});
|
||||
}
|
||||
}
|
||||
}
|
||||
// settings.Security.VersionRestrictions.Add(new VersionRestriction
|
||||
// {
|
||||
// Major = major,
|
||||
// Minor = minor,
|
||||
// Patch = patch,
|
||||
// Build = build,
|
||||
// IsMinimumRestriction = restriction.Contains("min"),
|
||||
// RequiresAllianceEdition = restriction.Contains("AE")
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -88,10 +88,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapPerformFallback(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool perform)
|
||||
{
|
||||
settings.Server.PerformFallback = perform;
|
||||
}
|
||||
//if (value is bool perform)
|
||||
//{
|
||||
// settings.Server.PerformFallback = perform;
|
||||
//}
|
||||
settings.Server.PerformFallback = true;
|
||||
}
|
||||
|
||||
private void MapRequestAttempts(AppSettings settings, object value)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -13,7 +13,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
{
|
||||
internal class ServiceDataMapper : BaseDataMapper
|
||||
{
|
||||
public static bool enable = true;
|
||||
internal override void Map(string key, object value, AppSettings settings)
|
||||
{
|
||||
switch (key)
|
||||
@@ -71,145 +70,119 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapEnableChromeNotifications(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableChromeNotifications = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableChromeNotifications = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableChromeNotifications = !enable;
|
||||
//}
|
||||
settings.Service.DisableChromeNotifications = false;
|
||||
}
|
||||
|
||||
private void MapEnableEaseOfAccessOptions(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableEaseOfAccessOptions = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableEaseOfAccessOptions = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableEaseOfAccessOptions = !enable;
|
||||
//}
|
||||
settings.Service.DisableEaseOfAccessOptions = false;
|
||||
}
|
||||
|
||||
private void MapEnableFindPrinter(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableFindPrinter = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableFindPrinter = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableFindPrinter = !enable;
|
||||
//}
|
||||
settings.Service.DisableFindPrinter = false;
|
||||
}
|
||||
|
||||
private void MapEnableNetworkOptions(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableNetworkOptions = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableNetworkOptions = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableNetworkOptions = !enable;
|
||||
//}
|
||||
settings.Service.DisableNetworkOptions = false;
|
||||
}
|
||||
|
||||
private void MapEnablePasswordChange(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisablePasswordChange = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisablePasswordChange = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisablePasswordChange = !enable;
|
||||
//}
|
||||
settings.Service.DisablePasswordChange = false;
|
||||
}
|
||||
|
||||
private void MapEnablePowerOptions(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisablePowerOptions = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisablePowerOptions = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisablePowerOptions = !enable;
|
||||
//}
|
||||
settings.Service.DisablePowerOptions = false;
|
||||
}
|
||||
|
||||
private void MapEnableRemoteConnections(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableRemoteConnections = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableRemoteConnections = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableRemoteConnections = !enable;
|
||||
//}
|
||||
settings.Service.DisableRemoteConnections = false;
|
||||
}
|
||||
|
||||
private void MapEnableSignout(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableSignout = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableSignout = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableSignout = !enable;
|
||||
//}
|
||||
settings.Service.DisableSignout = false;
|
||||
}
|
||||
|
||||
private void MapEnableTaskManager(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableTaskManager = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableTaskManager = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableTaskManager = !enable;
|
||||
//}
|
||||
settings.Service.DisableTaskManager = false;
|
||||
}
|
||||
|
||||
private void MapEnableUserLock(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableUserLock = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableUserLock = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableUserLock = !enable;
|
||||
//}
|
||||
settings.Service.DisableUserLock = false;
|
||||
}
|
||||
|
||||
private void MapEnableUserSwitch(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableUserSwitch = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableUserSwitch = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableUserSwitch = !enable;
|
||||
//}
|
||||
settings.Service.DisableUserSwitch = false;
|
||||
}
|
||||
|
||||
private void MapEnableVmwareOverlay(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableVmwareOverlay = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableVmwareOverlay = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableVmwareOverlay = !enable;
|
||||
//}
|
||||
settings.Service.DisableVmwareOverlay = false;
|
||||
}
|
||||
|
||||
private void MapEnableWindowsUpdate(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.Service.DisableWindowsUpdate = !enable;
|
||||
}
|
||||
*/
|
||||
settings.Service.DisableWindowsUpdate = !enable;
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.Service.DisableWindowsUpdate = !enable;
|
||||
//}
|
||||
settings.Service.DisableWindowsUpdate = false;
|
||||
}
|
||||
|
||||
private void MapIgnoreService(AppSettings settings, object value)
|
||||
@@ -218,12 +191,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
//{
|
||||
// settings.Service.IgnoreService = ignore;
|
||||
//}
|
||||
settings.Service.IgnoreService = enable;
|
||||
settings.Service.IgnoreService = true;
|
||||
}
|
||||
|
||||
private void MapPolicy(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
const int WARN = 1;
|
||||
const int FORCE = 2;
|
||||
|
||||
@@ -231,18 +203,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
{
|
||||
settings.Service.Policy = policy == FORCE ? ServicePolicy.Mandatory : (policy == WARN ? ServicePolicy.Warn : ServicePolicy.Optional);
|
||||
}
|
||||
*/
|
||||
settings.Service.Policy = ServicePolicy.Optional;
|
||||
}
|
||||
|
||||
private void MapSetVmwareConfiguration(AppSettings settings, object value)
|
||||
{
|
||||
/*
|
||||
if (value is bool set)
|
||||
{
|
||||
settings.Service.SetVmwareConfiguration = set;
|
||||
}
|
||||
*/
|
||||
//if (value is bool set)
|
||||
//{
|
||||
// settings.Service.SetVmwareConfiguration = set;
|
||||
//}
|
||||
settings.Service.SetVmwareConfiguration = false;
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -55,10 +55,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapEnableActionCenter(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.UserInterface.ActionCenter.EnableActionCenter = enable;
|
||||
}
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.UserInterface.ActionCenter.EnableActionCenter = enable;
|
||||
//}
|
||||
settings.UserInterface.ActionCenter.EnableActionCenter = false;
|
||||
}
|
||||
|
||||
private void MapLockScreenBackgroundColor(AppSettings settings, object value)
|
||||
@@ -71,38 +72,46 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapShowAudio(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool show)
|
||||
{
|
||||
settings.UserInterface.ActionCenter.ShowAudio = show;
|
||||
settings.UserInterface.Taskbar.ShowAudio = show;
|
||||
}
|
||||
//if (value is bool show)
|
||||
//{
|
||||
// settings.UserInterface.ActionCenter.ShowAudio = show;
|
||||
// settings.UserInterface.Taskbar.ShowAudio = show;
|
||||
//}
|
||||
settings.UserInterface.ActionCenter.ShowAudio = false;
|
||||
settings.UserInterface.Taskbar.ShowAudio = false;
|
||||
}
|
||||
|
||||
private void MapShowClock(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool show)
|
||||
{
|
||||
settings.UserInterface.ActionCenter.ShowClock = show;
|
||||
settings.UserInterface.Taskbar.ShowClock = show;
|
||||
}
|
||||
//if (value is bool show)
|
||||
//{
|
||||
// settings.UserInterface.ActionCenter.ShowClock = show;
|
||||
// settings.UserInterface.Taskbar.ShowClock = show;
|
||||
//}
|
||||
settings.UserInterface.ActionCenter.ShowClock = false;
|
||||
settings.UserInterface.Taskbar.ShowClock = false;
|
||||
}
|
||||
|
||||
private void MapShowKeyboardLayout(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool show)
|
||||
{
|
||||
settings.UserInterface.ActionCenter.ShowKeyboardLayout = show;
|
||||
settings.UserInterface.Taskbar.ShowKeyboardLayout = show;
|
||||
}
|
||||
//if (value is bool show)
|
||||
//{
|
||||
// settings.UserInterface.ActionCenter.ShowKeyboardLayout = show;
|
||||
// settings.UserInterface.Taskbar.ShowKeyboardLayout = show;
|
||||
//}
|
||||
settings.UserInterface.ActionCenter.ShowKeyboardLayout = false;
|
||||
settings.UserInterface.Taskbar.ShowKeyboardLayout = false;
|
||||
}
|
||||
|
||||
private void MapShowNetwork(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool show)
|
||||
{
|
||||
settings.UserInterface.ActionCenter.ShowNetwork = show;
|
||||
settings.UserInterface.Taskbar.ShowNetwork = show;
|
||||
}
|
||||
//if (value is bool show)
|
||||
//{
|
||||
// settings.UserInterface.ActionCenter.ShowNetwork = show;
|
||||
// settings.UserInterface.Taskbar.ShowNetwork = show;
|
||||
//}
|
||||
settings.UserInterface.ActionCenter.ShowNetwork = false;
|
||||
settings.UserInterface.Taskbar.ShowNetwork = false;
|
||||
}
|
||||
|
||||
private void MapChargeThresholdCritical(AppSettings settings, object value)
|
||||
@@ -123,18 +132,20 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
|
||||
|
||||
private void MapEnableTaskbar(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool enable)
|
||||
{
|
||||
settings.UserInterface.Taskbar.EnableTaskbar = enable;
|
||||
}
|
||||
//if (value is bool enable)
|
||||
//{
|
||||
// settings.UserInterface.Taskbar.EnableTaskbar = enable;
|
||||
//}
|
||||
settings.UserInterface.Taskbar.EnableTaskbar = false;
|
||||
}
|
||||
|
||||
private void MapShowApplicationLog(AppSettings settings, object value)
|
||||
{
|
||||
if (value is bool show)
|
||||
{
|
||||
settings.UserInterface.Taskbar.ShowApplicationLog = show;
|
||||
}
|
||||
//if (value is bool show)
|
||||
//{
|
||||
// settings.UserInterface.Taskbar.ShowApplicationLog = show;
|
||||
//}
|
||||
settings.UserInterface.Taskbar.ShowApplicationLog = false;
|
||||
}
|
||||
|
||||
private void MapUserInterfaceMode(AppSettings settings, object value)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -35,8 +35,17 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
|
||||
private void AllowBrowserToolbarForReloading(AppSettings settings)
|
||||
{
|
||||
settings.Browser.AdditionalWindow.ShowToolbar = true;
|
||||
//if (settings.Browser.AdditionalWindow.AllowReloading && settings.Browser.AdditionalWindow.ShowReloadButton)
|
||||
//{
|
||||
// settings.Browser.AdditionalWindow.ShowToolbar = true;
|
||||
//}
|
||||
|
||||
//if (settings.Browser.MainWindow.AllowReloading && settings.Browser.MainWindow.ShowReloadButton)
|
||||
//{
|
||||
// settings.Browser.MainWindow.ShowToolbar = true;
|
||||
//}
|
||||
settings.Browser.MainWindow.ShowToolbar = true;
|
||||
settings.Browser.AdditionalWindow.ShowToolbar = true;
|
||||
}
|
||||
|
||||
private void CalculateConfigurationKey(IDictionary<string, object> rawData, AppSettings settings)
|
||||
@@ -60,7 +69,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
private void InitializeBrowserHomeFunctionality(AppSettings settings)
|
||||
{
|
||||
settings.Browser.MainWindow.ShowHomeButton = settings.Browser.UseStartUrlAsHomeUrl || !string.IsNullOrWhiteSpace(settings.Browser.HomeUrl);
|
||||
settings.Browser.HomePasswordHash = "";
|
||||
settings.Browser.HomePasswordHash = settings.Security.QuitPasswordHash;
|
||||
}
|
||||
|
||||
private void InitializeClipboardSettings(AppSettings settings)
|
||||
@@ -73,7 +82,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
|
||||
private void InitializeProctoringSettings(AppSettings settings)
|
||||
{
|
||||
settings.Proctoring.Enabled = settings.Proctoring.ScreenProctoring.Enabled;
|
||||
settings.Proctoring.Enabled = false;
|
||||
}
|
||||
|
||||
private void RemoveLegacyBrowsers(AppSettings settings)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -100,94 +100,97 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
{
|
||||
var settings = new AppSettings();
|
||||
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "AA_v3.exe", OriginalName = "AA_v3.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "AeroAdmin.exe", OriginalName = "AeroAdmin.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "beamyourscreen-host.exe", OriginalName = "beamyourscreen-host.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamPlay.exe", OriginalName = "CamPlay.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Camtasia.exe", OriginalName = "Camtasia.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamtasiaStudio.exe", OriginalName = "CamtasiaStudio.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Camtasia_Studio.exe", OriginalName = "Camtasia_Studio.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamRecorder.exe", OriginalName = "CamRecorder.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamtasiaUtl.exe", OriginalName = "CamtasiaUtl.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "chromoting.exe", OriginalName = "chromoting.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CiscoCollabHost.exe", OriginalName = "CiscoCollabHost.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CiscoWebExStart.exe", OriginalName = "CiscoWebExStart.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Discord.exe", OriginalName = "Discord.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Element.exe", OriginalName = "Element.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mcomm.exe", OriginalName = "g2mcomm.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mlauncher.exe", OriginalName = "g2mlauncher.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mstart.exe", OriginalName = "g2mstart.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "GotoMeetingWinStore.exe", OriginalName = "GotoMeetingWinStore.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "join.me.exe", OriginalName = "join.me.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "join.me.sentinel.exe", OriginalName = "join.me.sentinel.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Microsoft.Media.player.exe", OriginalName = "Microsoft.Media.player.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Mikogo-host.exe", OriginalName = "Mikogo-host.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "MS-teams.exe", OriginalName = "MS-Teams.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "obs32.exe", OriginalName = "obs32.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "obs64.exe", OriginalName = "obs64.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "PCMonitorSrv.exe", OriginalName = "PCMonitorSrv.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "pcmontask.exe", OriginalName = "pcmontask.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "ptoneclk.exe", OriginalName = "ptoneclk.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RemotePCDesktop.exe", OriginalName = "RemotePCDesktop.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "remoting_host.exe", OriginalName = "remoting_host.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RPCService.exe", OriginalName = "RPCService.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RPCSuite.exe", OriginalName = "RPCSuite.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "sethc.exe", OriginalName = "sethc.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Skype.exe", OriginalName = "Skype.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SkypeApp.exe", OriginalName = "SkypeApp.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SkypeHost.exe", OriginalName = "SkypeHost.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "slack.exe", OriginalName = "slack.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "spotify.exe", OriginalName = "spotify.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SRServer.exe", OriginalName = "SRServer.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "strwinclt.exe", OriginalName = "strwinclt.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Teams.exe", OriginalName = "Teams.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "TeamViewer.exe", OriginalName = "TeamViewer.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Telegram.exe", OriginalName = "Telegram.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "VLC.exe", OriginalName = "VLC.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncserver.exe", OriginalName = "vncserver.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncviewer.exe", OriginalName = "vncviewer.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncserverui.exe", OriginalName = "vncserverui.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "webexmta.exe", OriginalName = "webexmta.exe" });
|
||||
settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Zoom.exe", OriginalName = "Zoom.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "AA_v3.exe", OriginalName = "AA_v3.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "AeroAdmin.exe", OriginalName = "AeroAdmin.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "beamyourscreen-host.exe", OriginalName = "beamyourscreen-host.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamPlay.exe", OriginalName = "CamPlay.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Camtasia.exe", OriginalName = "Camtasia.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamtasiaStudio.exe", OriginalName = "CamtasiaStudio.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Camtasia_Studio.exe", OriginalName = "Camtasia_Studio.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamRecorder.exe", OriginalName = "CamRecorder.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CamtasiaUtl.exe", OriginalName = "CamtasiaUtl.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "chromoting.exe", OriginalName = "chromoting.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CiscoCollabHost.exe", OriginalName = "CiscoCollabHost.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "CiscoWebExStart.exe", OriginalName = "CiscoWebExStart.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Discord.exe", OriginalName = "Discord.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "DiscordPTB.exe", OriginalName = "DiscordPTB.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "DiscordCanary.exe", OriginalName = "DiscordCanary.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Element.exe", OriginalName = "Element.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mcomm.exe", OriginalName = "g2mcomm.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mlauncher.exe", OriginalName = "g2mlauncher.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "g2mstart.exe", OriginalName = "g2mstart.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "GotoMeetingWinStore.exe", OriginalName = "GotoMeetingWinStore.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Guilded.exe", OriginalName = "Guilded.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "join.me.exe", OriginalName = "join.me.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "join.me.sentinel.exe", OriginalName = "join.me.sentinel.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Microsoft.Media.player.exe", OriginalName = "Microsoft.Media.player.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Mikogo-host.exe", OriginalName = "Mikogo-host.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "MS-teams.exe", OriginalName = "MS-Teams.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "obs32.exe", OriginalName = "obs32.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "obs64.exe", OriginalName = "obs64.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "PCMonitorSrv.exe", OriginalName = "PCMonitorSrv.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "pcmontask.exe", OriginalName = "pcmontask.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "ptoneclk.exe", OriginalName = "ptoneclk.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RemotePCDesktop.exe", OriginalName = "RemotePCDesktop.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "remoting_host.exe", OriginalName = "remoting_host.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RPCService.exe", OriginalName = "RPCService.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "RPCSuite.exe", OriginalName = "RPCSuite.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "sethc.exe", OriginalName = "sethc.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Skype.exe", OriginalName = "Skype.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SkypeApp.exe", OriginalName = "SkypeApp.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SkypeHost.exe", OriginalName = "SkypeHost.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "slack.exe", OriginalName = "slack.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "spotify.exe", OriginalName = "spotify.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "SRServer.exe", OriginalName = "SRServer.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "strwinclt.exe", OriginalName = "strwinclt.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Teams.exe", OriginalName = "Teams.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "TeamViewer.exe", OriginalName = "TeamViewer.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Telegram.exe", OriginalName = "Telegram.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "VLC.exe", OriginalName = "VLC.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncserver.exe", OriginalName = "vncserver.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncviewer.exe", OriginalName = "vncviewer.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "vncserverui.exe", OriginalName = "vncserverui.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "webexmta.exe", OriginalName = "webexmta.exe" });
|
||||
//settings.Applications.Blacklist.Add(new BlacklistApplication { ExecutableName = "Zoom.exe", OriginalName = "Zoom.exe" });
|
||||
|
||||
settings.Browser.AdditionalWindow.AllowAddressBar = false;
|
||||
settings.Browser.AdditionalWindow.AllowBackwardNavigation = true;
|
||||
settings.Browser.AdditionalWindow.AllowDeveloperConsole = false;
|
||||
settings.Browser.AdditionalWindow.AllowDeveloperConsole = true;
|
||||
settings.Browser.AdditionalWindow.AllowForwardNavigation = true;
|
||||
settings.Browser.AdditionalWindow.AllowReloading = true;
|
||||
settings.Browser.AdditionalWindow.FullScreenMode = false;
|
||||
settings.Browser.AdditionalWindow.Position = WindowPosition.Right;
|
||||
settings.Browser.AdditionalWindow.RelativeHeight = 100;
|
||||
settings.Browser.AdditionalWindow.RelativeWidth = 50;
|
||||
settings.Browser.AdditionalWindow.ShowHomeButton = false;
|
||||
settings.Browser.AdditionalWindow.ShowReloadWarning = false;
|
||||
settings.Browser.AdditionalWindow.ShowToolbar = false;
|
||||
settings.Browser.AdditionalWindow.ShowHomeButton = true;
|
||||
settings.Browser.AdditionalWindow.ShowReloadWarning = true;
|
||||
settings.Browser.AdditionalWindow.ShowToolbar = true;
|
||||
settings.Browser.AdditionalWindow.UrlPolicy = UrlPolicy.Never;
|
||||
settings.Browser.AllowConfigurationDownloads = true;
|
||||
settings.Browser.AllowCustomDownAndUploadLocation = false;
|
||||
settings.Browser.AllowCustomDownAndUploadLocation = true;
|
||||
settings.Browser.AllowDownloads = true;
|
||||
settings.Browser.AllowFind = true;
|
||||
settings.Browser.AllowPageZoom = true;
|
||||
settings.Browser.AllowPdfReader = true;
|
||||
settings.Browser.AllowPdfReaderToolbar = false;
|
||||
settings.Browser.AllowPrint = false;
|
||||
settings.Browser.AllowPrint = true;
|
||||
settings.Browser.AllowUploads = true;
|
||||
settings.Browser.DeleteCacheOnShutdown = true;
|
||||
settings.Browser.DeleteCookiesOnShutdown = true;
|
||||
settings.Browser.DeleteCookiesOnStartup = true;
|
||||
settings.Browser.EnableBrowser = true;
|
||||
settings.Browser.MainWindow.AllowAddressBar = false;
|
||||
settings.Browser.MainWindow.AllowBackwardNavigation = false;
|
||||
settings.Browser.MainWindow.AllowDeveloperConsole = false;
|
||||
settings.Browser.MainWindow.AllowForwardNavigation = false;
|
||||
settings.Browser.MainWindow.AllowBackwardNavigation = true;
|
||||
settings.Browser.MainWindow.AllowDeveloperConsole = true;
|
||||
settings.Browser.MainWindow.AllowForwardNavigation = true;
|
||||
settings.Browser.MainWindow.AllowReloading = true;
|
||||
settings.Browser.MainWindow.FullScreenMode = false;
|
||||
settings.Browser.MainWindow.RelativeHeight = 100;
|
||||
settings.Browser.MainWindow.RelativeWidth = 100;
|
||||
settings.Browser.MainWindow.ShowHomeButton = false;
|
||||
settings.Browser.MainWindow.ShowHomeButton = true;
|
||||
settings.Browser.MainWindow.ShowReloadWarning = true;
|
||||
settings.Browser.MainWindow.ShowToolbar = false;
|
||||
settings.Browser.MainWindow.UrlPolicy = UrlPolicy.Never;
|
||||
settings.Browser.MainWindow.ShowToolbar = true;
|
||||
settings.Browser.MainWindow.UrlPolicy = UrlPolicy.Always;
|
||||
settings.Browser.PopupPolicy = PopupPolicy.Allow;
|
||||
settings.Browser.Proxy.Policy = ProxyPolicy.System;
|
||||
settings.Browser.ResetOnQuitUrl = false;
|
||||
@@ -196,22 +199,22 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
settings.Browser.ShowFileSystemElementPath = true;
|
||||
settings.Browser.StartUrl = "https://www.safeexambrowser.org/start";
|
||||
settings.Browser.UseCustomUserAgent = false;
|
||||
settings.Browser.UseIsolatedClipboard = true;
|
||||
settings.Browser.UseIsolatedClipboard = false;
|
||||
settings.Browser.UseQueryParameter = false;
|
||||
settings.Browser.UseTemporaryDownAndUploadDirectory = false;
|
||||
|
||||
settings.ConfigurationMode = ConfigurationMode.Exam;
|
||||
|
||||
settings.Display.AllowedDisplays = 1;
|
||||
settings.Display.AllowedDisplays = 500;
|
||||
settings.Display.AlwaysOn = true;
|
||||
settings.Display.IgnoreError = false;
|
||||
settings.Display.IgnoreError = true;
|
||||
settings.Display.InternalDisplayOnly = false;
|
||||
|
||||
settings.Keyboard.AllowAltEsc = false;
|
||||
settings.Keyboard.AllowAltF4 = false;
|
||||
settings.Keyboard.AllowAltEsc = true;
|
||||
settings.Keyboard.AllowAltF4 = true;
|
||||
settings.Keyboard.AllowAltTab = true;
|
||||
settings.Keyboard.AllowCtrlC = true;
|
||||
settings.Keyboard.AllowCtrlEsc = false;
|
||||
settings.Keyboard.AllowCtrlEsc = true;
|
||||
settings.Keyboard.AllowCtrlV = true;
|
||||
settings.Keyboard.AllowCtrlX = true;
|
||||
settings.Keyboard.AllowEsc = true;
|
||||
@@ -227,12 +230,12 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
settings.Keyboard.AllowF10 = true;
|
||||
settings.Keyboard.AllowF11 = true;
|
||||
settings.Keyboard.AllowF12 = true;
|
||||
settings.Keyboard.AllowPrintScreen = false;
|
||||
settings.Keyboard.AllowSystemKey = false;
|
||||
settings.Keyboard.AllowPrintScreen = true;
|
||||
settings.Keyboard.AllowSystemKey = true;
|
||||
|
||||
settings.LogLevel = LogLevel.Debug;
|
||||
settings.LogLevel = LogLevel.Error;
|
||||
|
||||
settings.Mouse.AllowMiddleButton = false;
|
||||
settings.Mouse.AllowMiddleButton = true;
|
||||
settings.Mouse.AllowRightButton = true;
|
||||
|
||||
settings.PowerSupply.ChargeThresholdCritical = 0.1;
|
||||
@@ -240,28 +243,29 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
|
||||
settings.Proctoring.Enabled = false;
|
||||
settings.Proctoring.ForceRaiseHandMessage = false;
|
||||
settings.Proctoring.ScreenProctoring.CacheSize = 500;
|
||||
settings.Proctoring.ScreenProctoring.Enabled = false;
|
||||
settings.Proctoring.ScreenProctoring.ImageDownscaling = 1.0;
|
||||
settings.Proctoring.ScreenProctoring.ImageFormat = ImageFormat.Png;
|
||||
settings.Proctoring.ScreenProctoring.ImageQuantization = ImageQuantization.Grayscale4bpp;
|
||||
settings.Proctoring.ScreenProctoring.MaxInterval = 5000;
|
||||
settings.Proctoring.ScreenProctoring.IntervalMaximum = 5000;
|
||||
settings.Proctoring.ScreenProctoring.IntervalMinimum = 1000;
|
||||
settings.Proctoring.ScreenProctoring.MetaData.CaptureApplicationData = true;
|
||||
settings.Proctoring.ScreenProctoring.MetaData.CaptureBrowserData = true;
|
||||
settings.Proctoring.ScreenProctoring.MetaData.CaptureWindowTitle = true;
|
||||
settings.Proctoring.ScreenProctoring.MinInterval = 1000;
|
||||
settings.Proctoring.ShowRaiseHandNotification = true;
|
||||
settings.Proctoring.ShowTaskbarNotification = true;
|
||||
|
||||
settings.Security.AllowApplicationLogAccess = false;
|
||||
settings.Security.AllowTermination = true;
|
||||
settings.Security.AllowReconfiguration = false;
|
||||
settings.Security.AllowStickyKeys = false;
|
||||
settings.Security.ClipboardPolicy = ClipboardPolicy.Isolated;
|
||||
settings.Security.AllowReconfiguration = true;
|
||||
settings.Security.AllowStickyKeys = true;
|
||||
settings.Security.ClipboardPolicy = ClipboardPolicy.Allow;
|
||||
settings.Security.DisableSessionChangeLockScreen = false;
|
||||
settings.Security.KioskMode = KioskMode.CreateNewDesktop;
|
||||
settings.Security.VerifyCursorConfiguration = true;
|
||||
settings.Security.VerifySessionIntegrity = true;
|
||||
settings.Security.VirtualMachinePolicy = VirtualMachinePolicy.Deny;
|
||||
settings.Security.KioskMode = KioskMode.None;
|
||||
settings.Security.VerifyCursorConfiguration = false;
|
||||
settings.Security.VerifySessionIntegrity = false;
|
||||
settings.Security.VirtualMachinePolicy = VirtualMachinePolicy.Allow;
|
||||
|
||||
settings.Server.PingInterval = 1000;
|
||||
settings.Server.RequestAttemptInterval = 2000;
|
||||
@@ -269,28 +273,28 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
settings.Server.RequestTimeout = 30000;
|
||||
settings.Server.PerformFallback = false;
|
||||
|
||||
settings.Service.DisableChromeNotifications = true;
|
||||
settings.Service.DisableEaseOfAccessOptions = true;
|
||||
settings.Service.DisableFindPrinter = true;
|
||||
settings.Service.DisableNetworkOptions = true;
|
||||
settings.Service.DisablePasswordChange = true;
|
||||
settings.Service.DisablePowerOptions = true;
|
||||
settings.Service.DisableRemoteConnections = true;
|
||||
settings.Service.DisableSignout = true;
|
||||
settings.Service.DisableTaskManager = true;
|
||||
settings.Service.DisableUserLock = true;
|
||||
settings.Service.DisableUserSwitch = true;
|
||||
settings.Service.DisableVmwareOverlay = true;
|
||||
settings.Service.DisableWindowsUpdate = true;
|
||||
settings.Service.DisableChromeNotifications = false;
|
||||
settings.Service.DisableEaseOfAccessOptions = false;
|
||||
settings.Service.DisableFindPrinter = false;
|
||||
settings.Service.DisableNetworkOptions = false;
|
||||
settings.Service.DisablePasswordChange = false;
|
||||
settings.Service.DisablePowerOptions = false;
|
||||
settings.Service.DisableRemoteConnections = false;
|
||||
settings.Service.DisableSignout = false;
|
||||
settings.Service.DisableTaskManager = false;
|
||||
settings.Service.DisableUserLock = false;
|
||||
settings.Service.DisableUserSwitch = false;
|
||||
settings.Service.DisableVmwareOverlay = false;
|
||||
settings.Service.DisableWindowsUpdate = false;
|
||||
settings.Service.IgnoreService = true;
|
||||
settings.Service.Policy = ServicePolicy.Mandatory;
|
||||
settings.Service.SetVmwareConfiguration = false;
|
||||
|
||||
settings.SessionMode = SessionMode.Normal;
|
||||
|
||||
settings.System.AlwaysOn = true;
|
||||
settings.System.AlwaysOn = false;
|
||||
|
||||
settings.UserInterface.ActionCenter.EnableActionCenter = true;
|
||||
settings.UserInterface.ActionCenter.EnableActionCenter = false;
|
||||
settings.UserInterface.ActionCenter.ShowApplicationInfo = true;
|
||||
settings.UserInterface.ActionCenter.ShowApplicationLog = false;
|
||||
settings.UserInterface.ActionCenter.ShowClock = true;
|
||||
@@ -298,13 +302,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
settings.UserInterface.ActionCenter.ShowNetwork = false;
|
||||
settings.UserInterface.LockScreen.BackgroundColor = "#ff0000";
|
||||
settings.UserInterface.Mode = UserInterfaceMode.Desktop;
|
||||
settings.UserInterface.Taskbar.EnableTaskbar = true;
|
||||
settings.UserInterface.Taskbar.EnableTaskbar = false;
|
||||
settings.UserInterface.Taskbar.ShowApplicationInfo = false;
|
||||
settings.UserInterface.Taskbar.ShowApplicationLog = false;
|
||||
settings.UserInterface.Taskbar.ShowClock = true;
|
||||
settings.UserInterface.Taskbar.ShowKeyboardLayout = true;
|
||||
settings.UserInterface.Taskbar.ShowNetwork = false;
|
||||
|
||||
settings.Browser.HomeUrl = "https://google.com";
|
||||
return settings;
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 ETH Zürich, IT Services
|
||||
* Copyright (c) 2025 ETH Zürich, IT Services
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -46,7 +46,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
internal const string AllowCustomDownUploadLocation = "allowCustomDownUploadLocation";
|
||||
internal const string AllowDeveloperConsole = "allowDeveloperConsole";
|
||||
internal const string AllowDownloads = "allowDownloads";
|
||||
internal const string AllowDownloadsAndUploads = "allowDownUploads";
|
||||
internal const string AllowFind = "allowFind";
|
||||
internal const string AllowPageZoom = "enableZoomPage";
|
||||
internal const string AllowPdfReaderToolbar = "allowPDFReaderToolbar";
|
||||
@@ -237,6 +236,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
|
||||
internal static class ScreenProctoring
|
||||
{
|
||||
internal const string CacheSize = "screenProctoringCacheSize";
|
||||
internal const string ClientId = "screenProctoringClientId";
|
||||
internal const string ClientSecret = "screenProctoringClientSecret";
|
||||
internal const string Enabled = "enableScreenProctoring";
|
||||
@@ -244,8 +244,8 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||
internal const string ImageDownscaling = "screenProctoringImageDownscale";
|
||||
internal const string ImageFormat = "screenProctoringImageFormat";
|
||||
internal const string ImageQuantization = "screenProctoringImageQuantization";
|
||||
internal const string MaxInterval = "screenProctoringScreenshotMaxInterval";
|
||||
internal const string MinInterval = "screenProctoringScreenshotMinInterval";
|
||||
internal const string IntervalMaximum = "screenProctoringScreenshotMaxInterval";
|
||||
internal const string IntervalMinimum = "screenProctoringScreenshotMinInterval";
|
||||
internal const string ServiceUrl = "screenProctoringServiceURL";
|
||||
|
||||
internal static class MetaData
|
||||
|
Reference in New Issue
Block a user