SEBWIN-226: Implemented mapping of download configuration.

This commit is contained in:
dbuechel 2019-01-23 14:37:24 +01:00
parent 44ac991c2c
commit 1068efc384
4 changed files with 25 additions and 1 deletions

View file

@ -13,6 +13,22 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
{
internal partial class DataMapper
{
private void MapAllowConfigurationDownloads(Settings settings, object value)
{
if (value is bool allow)
{
settings.Browser.AllowConfigurationDownloads = allow;
}
}
private void MapAllowDownloads(Settings settings, object value)
{
if (value is bool allow)
{
settings.Browser.AllowDownloads = allow;
}
}
private void MapAllowNavigation(Settings settings, object value)
{
if (value is bool allow)

View file

@ -27,6 +27,12 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
{
switch (key)
{
case Keys.Browser.AllowConfigurationDownloads:
MapAllowConfigurationDownloads(settings, value);
break;
case Keys.Browser.AllowDownloads:
MapAllowDownloads(settings, value);
break;
case Keys.Browser.AllowNavigation:
MapAllowNavigation(settings, value);
break;

View file

@ -91,7 +91,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
settings.Browser.StartUrl = "https://www.safeexambrowser.org/start";
settings.Browser.AllowConfigurationDownloads = true;
settings.Browser.AllowDeveloperConsole = false;
settings.Browser.AllowDownloads = false;
settings.Browser.AllowDownloads = true;
settings.Browser.AllowPageZoom = true;
settings.Browser.AllowPopups = true;
settings.Browser.AdditionalWindowSettings.AllowAddressBar = false;

View file

@ -20,6 +20,8 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
internal static class Browser
{
internal const string AllowConfigurationDownloads = "downloadAndOpenSebConfig";
internal const string AllowDownloads = "allowDownUploads";
internal const string AllowNavigation = "allowBrowsingBackForward";
internal const string AllowNavigationAdditionalWindow = "newBrowserWindowNavigation";
internal const string AllowPageZoom = "enableZoomPage";