History

whitelist -> allowlist

HifiExperiments committed 2 years ago

Commit f2d8fa21 parent 2876a4d28 files · +199 −199Browse files

Showing the changes to libraries/script-engine/src/ScriptGatekeeper.cpp (1 of 28 files). Show all

Unified · Split

libraries/script-engine/src/ScriptGatekeeper.cpp+8−8
@@ -19,21 +19,21 @@ void ScriptGatekeeper::initialize() { · 18 unmodified lines
19 return;19 return;
20 }20 }
21 21
22 QVariant rawCurrentWhitelistValues = Setting::Handle<QVariant>(SCRIPT_WHITELIST_ENTRIES_KEY).get();22 QVariant rawCurrentAllowlistValues = Setting::Handle<QVariant>(SCRIPT_ALLOWLIST_ENTRIES_KEY).get();
23 QString settingsSafeValues = rawCurrentWhitelistValues.toString();23 QString settingsSafeValues = rawCurrentAllowlistValues.toString();
24 24
25 Setting::Handle<bool> whitelistEnabled { SCRIPT_WHITELIST_ENABLED_KEY, false };25 Setting::Handle<bool> allowlistEnabled { SCRIPT_ALLOWLIST_ENABLED_KEY, false };
26 Setting::Handle<bool> isFirstRun { Settings::firstRun, true };26 Setting::Handle<bool> isFirstRun { Settings::firstRun, true };
27 27
28 QString preloadedVal = BuildInfo::PRELOADED_SCRIPT_WHITELIST;28 QString preloadedVal = BuildInfo::PRELOADED_SCRIPT_ALLOWLIST;
29 29
30 if (settingsSafeValues.isEmpty() && !preloadedVal.isEmpty() && isFirstRun.get()) {30 if (settingsSafeValues.isEmpty() && !preloadedVal.isEmpty() && isFirstRun.get()) {
31 // We assume that the whitelist should be enabled if a preloaded whitelist is attached, so we activate it if it's not already active.31 // We assume that the allowlist should be enabled if a preloaded allowlist is attached, so we activate it if it's not already active.
32 if (!whitelistEnabled.get()) {32 if (!allowlistEnabled.get()) {
33 whitelistEnabled.set(true);33 allowlistEnabled.set(true);
34 }34 }
35 35
36 Setting::Handle<QVariant>(SCRIPT_WHITELIST_ENTRIES_KEY).set(preloadedVal);36 Setting::Handle<QVariant>(SCRIPT_ALLOWLIST_ENTRIES_KEY).set(preloadedVal);
37 }37 }
38 38
39 _initialized = true;39 _initialized = true;