diff options
author | fqj <fqj@chromium.org> | 2015-11-13 12:12:59 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-13 20:14:14 +0000 |
commit | fee5067aaad72d7b0525d23d5f6eb2500831feab (patch) | |
tree | ddcfce303fca05ca87b182c857723e10d1847ae6 /chromeos/network/onc | |
parent | ca1054043bbb319a687bf7214c8d206de53a07c1 (diff) | |
download | chromium_src-fee5067aaad72d7b0525d23d5f6eb2500831feab.zip chromium_src-fee5067aaad72d7b0525d23d5f6eb2500831feab.tar.gz chromium_src-fee5067aaad72d7b0525d23d5f6eb2500831feab.tar.bz2 |
Handle prohibited technologies in device policy ONC
This commit changes prohibited technologies from user policy ONC to device
policy ONC, and then handles it.
The device policy ONC will only take effect after user session starts.
After use has logged in, the prohibited technologies in ONC will take effect
and disable and prohibit specific technologies.
BUG=426390
Review URL: https://codereview.chromium.org/1431563005
Cr-Commit-Position: refs/heads/master@{#359602}
Diffstat (limited to 'chromeos/network/onc')
-rw-r--r-- | chromeos/network/onc/onc_validator.cc | 6 | ||||
-rw-r--r-- | chromeos/network/onc/onc_validator_unittest.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc index 6574561..ee681aa 100644 --- a/chromeos/network/onc/onc_validator.cc +++ b/chromeos/network/onc/onc_validator.cc @@ -887,11 +887,11 @@ bool Validator::ValidateGlobalNetworkConfiguration( const base::ListValue* disabled_network_types = NULL; if (result->GetListWithoutPathExpansion(kDisableNetworkTypes, &disabled_network_types)) { - // The kDisableNetworkTypes field is only allowed in user policy. + // The kDisableNetworkTypes field is only allowed in device policy. if (!disabled_network_types->empty() && - onc_source_ != ::onc::ONC_SOURCE_USER_POLICY) { + onc_source_ != ::onc::ONC_SOURCE_DEVICE_POLICY) { error_or_warning_found_ = true; - LOG(ERROR) << "Disabled network types only allowed in user policy."; + LOG(ERROR) << "Disabled network types only allowed in device policy."; return false; } } diff --git a/chromeos/network/onc/onc_validator_unittest.cc b/chromeos/network/onc/onc_validator_unittest.cc index f1bf451..7fc6a26 100644 --- a/chromeos/network/onc/onc_validator_unittest.cc +++ b/chromeos/network/onc/onc_validator_unittest.cc @@ -149,11 +149,11 @@ INSTANTIATE_TEST_CASE_P( &kToplevelConfigurationSignature, true, ::onc::ONC_SOURCE_DEVICE_POLICY), - // Disabled technologies are only allowed for user policies. + // Disabled technologies are only allowed for device policies. OncParams("managed_toplevel_with_disabled_technologies.onc", &kToplevelConfigurationSignature, true, - ::onc::ONC_SOURCE_USER_POLICY), + ::onc::ONC_SOURCE_DEVICE_POLICY), // AllowOnlyPolicyNetworksToConnect is only allowed for device policies. OncParams("managed_toplevel_with_only_managed.onc", &kToplevelConfigurationSignature, |