Commit dae991a0 authored by Toby Huang's avatar Toby Huang Committed by Commit Bot

Allow Tast test extension for supervised users

Tast is using a Chrome extension for testing supervised users, but
extensions are blocked by default for supervised users. This CL hard-
codes the Tast extension id and always allows it.

Bug: 1068265
Change-Id: I2ba7f66877c3113db6da5b55a47d5c007b5c95db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144469Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Commit-Queue: Toby Huang <tobyhuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759152}
parent 97fd8305
...@@ -89,6 +89,15 @@ const char kBlacklistURL[] = ...@@ -89,6 +89,15 @@ const char kBlacklistURL[] =
// The filename under which we'll store the blacklist (in the user data dir). // The filename under which we'll store the blacklist (in the user data dir).
const char kBlacklistFilename[] = "su-blacklist.bin"; const char kBlacklistFilename[] = "su-blacklist.bin";
#if BUILDFLAG(ENABLE_EXTENSIONS)
// These extensions are allowed for supervised users for internal development
// purposes.
constexpr char const* kAllowlistExtensionIds[] = {
"behllobkkfkfnphdnhnkndlbkcpglgmj" // Tast extension.
};
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
const char* const kCustodianInfoPrefs[] = { const char* const kCustodianInfoPrefs[] = {
prefs::kSupervisedUserCustodianName, prefs::kSupervisedUserCustodianName,
prefs::kSupervisedUserCustodianEmail, prefs::kSupervisedUserCustodianEmail,
...@@ -763,6 +772,10 @@ SupervisedUserService::ExtensionState SupervisedUserService::GetExtensionState( ...@@ -763,6 +772,10 @@ SupervisedUserService::ExtensionState SupervisedUserService::GetExtensionState(
return ExtensionState::ALLOWED; return ExtensionState::ALLOWED;
} }
if (base::Contains(kAllowlistExtensionIds, extension.id())) {
return ExtensionState::ALLOWED;
}
if (base::FeatureList::IsEnabled( if (base::FeatureList::IsEnabled(
supervised_users::kSupervisedUserAllowlistExtensionInstall)) { supervised_users::kSupervisedUserAllowlistExtensionInstall)) {
extensions::ExtensionManagement* management = extensions::ExtensionManagement* management =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment