SEBWIN-226: Implemented mapping of download configuration.
This commit is contained in:
parent
44ac991c2c
commit
1068efc384
4 changed files with 25 additions and 1 deletions
|
@ -13,6 +13,22 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||||
{
|
{
|
||||||
internal partial class DataMapper
|
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)
|
private void MapAllowNavigation(Settings settings, object value)
|
||||||
{
|
{
|
||||||
if (value is bool allow)
|
if (value is bool allow)
|
||||||
|
|
|
@ -27,6 +27,12 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||||
{
|
{
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
|
case Keys.Browser.AllowConfigurationDownloads:
|
||||||
|
MapAllowConfigurationDownloads(settings, value);
|
||||||
|
break;
|
||||||
|
case Keys.Browser.AllowDownloads:
|
||||||
|
MapAllowDownloads(settings, value);
|
||||||
|
break;
|
||||||
case Keys.Browser.AllowNavigation:
|
case Keys.Browser.AllowNavigation:
|
||||||
MapAllowNavigation(settings, value);
|
MapAllowNavigation(settings, value);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -91,7 +91,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||||
settings.Browser.StartUrl = "https://www.safeexambrowser.org/start";
|
settings.Browser.StartUrl = "https://www.safeexambrowser.org/start";
|
||||||
settings.Browser.AllowConfigurationDownloads = true;
|
settings.Browser.AllowConfigurationDownloads = true;
|
||||||
settings.Browser.AllowDeveloperConsole = false;
|
settings.Browser.AllowDeveloperConsole = false;
|
||||||
settings.Browser.AllowDownloads = false;
|
settings.Browser.AllowDownloads = true;
|
||||||
settings.Browser.AllowPageZoom = true;
|
settings.Browser.AllowPageZoom = true;
|
||||||
settings.Browser.AllowPopups = true;
|
settings.Browser.AllowPopups = true;
|
||||||
settings.Browser.AdditionalWindowSettings.AllowAddressBar = false;
|
settings.Browser.AdditionalWindowSettings.AllowAddressBar = false;
|
||||||
|
|
|
@ -20,6 +20,8 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
||||||
|
|
||||||
internal static class Browser
|
internal static class Browser
|
||||||
{
|
{
|
||||||
|
internal const string AllowConfigurationDownloads = "downloadAndOpenSebConfig";
|
||||||
|
internal const string AllowDownloads = "allowDownUploads";
|
||||||
internal const string AllowNavigation = "allowBrowsingBackForward";
|
internal const string AllowNavigation = "allowBrowsingBackForward";
|
||||||
internal const string AllowNavigationAdditionalWindow = "newBrowserWindowNavigation";
|
internal const string AllowNavigationAdditionalWindow = "newBrowserWindowNavigation";
|
||||||
internal const string AllowPageZoom = "enableZoomPage";
|
internal const string AllowPageZoom = "enableZoomPage";
|
||||||
|
|
Loading…
Reference in a new issue