diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataProcessor.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataProcessor.cs index 14254455..13a2ceab 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataProcessor.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataProcessor.cs @@ -20,6 +20,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal void Process(IDictionary rawData, AppSettings settings) { AllowReconfiguration(settings); + AllowBrowserToolbarForReloading(rawData, settings); CalculateConfigurationKey(rawData, settings); RemoveLegacyBrowsers(settings); } @@ -29,6 +30,21 @@ namespace SafeExamBrowser.Configuration.ConfigurationData settings.Security.AllowReconfiguration = settings.ConfigurationMode == ConfigurationMode.ConfigureClient; } + private void AllowBrowserToolbarForReloading(IDictionary rawData, AppSettings settings) + { + var showReloadButton = rawData.TryGetValue(Keys.Browser.ShowReloadButton, out var v) && v is bool show && show; + + if (settings.Browser.AdditionalWindow.AllowReloading && showReloadButton) + { + settings.Browser.AdditionalWindow.ShowToolbar = true; + } + + if (settings.Browser.MainWindow.AllowReloading && showReloadButton) + { + settings.Browser.MainWindow.ShowToolbar = true; + } + } + private void CalculateConfigurationKey(IDictionary rawData, AppSettings settings) { using (var algorithm = new SHA256Managed()) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs index 646175d7..a5770253 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs @@ -61,6 +61,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal const string PopupBlockForeignHost = "newBrowserWindowByLinkBlockForeign"; internal const string QuitUrl = "quitURL"; internal const string QuitUrlConfirmation = "quitURLConfirm"; + internal const string ShowReloadButton = "showReloadButton"; internal const string ShowToolbar = "enableBrowserWindowToolbar"; internal const string SendCustomHeaders = "sendBrowserExamKey"; internal const string StartUrl = "startURL";