Skip to content

Commit

Permalink
SEBWIN-941: Completely removed combined configuration value for down-…
Browse files Browse the repository at this point in the history
… and uploads.
  • Loading branch information
dbuechel committed Nov 14, 2024
1 parent fb6e3d9 commit c491c14
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ internal override void Map(string key, object value, AppSettings settings)

internal override void MapGlobal(IDictionary<string, object> rawData, AppSettings settings)
{
MapLegacyDownUploadSetting(rawData, settings);
MapPopupPolicy(rawData, settings);
MapRequestFilter(rawData, settings);
MapUserAgentMode(rawData, settings);
Expand Down Expand Up @@ -407,15 +406,6 @@ private void MapHomeButtonUseStartUrl(AppSettings settings, object value)
}
}

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;
}
}

private void MapMainWindowMode(AppSettings settings, object value)
{
const int FULLSCREEN = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ internal AppSettings LoadDefaultSettings()
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" });
Expand Down Expand Up @@ -151,7 +152,6 @@ internal AppSettings LoadDefaultSettings()
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 = "Guilded.exe", OriginalName = "Guilded.exe" });

settings.Browser.AdditionalWindow.AllowAddressBar = false;
settings.Browser.AdditionalWindow.AllowBackwardNavigation = true;
Expand Down
1 change: 0 additions & 1 deletion SafeExamBrowser.Configuration/ConfigurationData/Keys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ internal static class Browser
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";
Expand Down
2 changes: 0 additions & 2 deletions SebWindowsConfig/SEBSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ public class SEBSettings
public const String KeyAllowPrint = "allowPrint";

// Group "DownUploads"
public const String KeyAllowDownUploads = "allowDownUploads";
public const String KeyAllowCustomDownUploadLocation = "allowCustomDownUploadLocation";
public const String KeyDownloadDirectoryOSX = "downloadDirectoryOSX";
public const String KeyDownloadDirectoryWin = "downloadDirectoryWin";
Expand Down Expand Up @@ -722,7 +721,6 @@ public static void CreateDefaultAndCurrentSettingsFromScratch()
SEBSettings.strArrayDefault[SEBSettings.ValNewBrowserWindowByLinkHeight] = "100%";

// Default settings for group "DownUploads"
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowDownUploads, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowCustomDownUploadLocation, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadDirectoryOSX, "~/Downloads");
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadDirectoryWin, "");
Expand Down
Loading

0 comments on commit c491c14

Please sign in to comment.