Commit b7c6cdb6 authored by Julia Feitosa's avatar Julia Feitosa Committed by Commit Bot

Disallow setting VPNs in C++ for child accounts

Bug: 933768
Change-Id: I8778058205a5e6f6f5973cb2831292c7da985329
Reviewed-on: https://chromium-review.googlesource.com/c/1479730Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Julia Feitosa <carvalheira@google.com>
Cr-Commit-Position: refs/heads/master@{#635092}
parent a7a6c3a9
......@@ -145,8 +145,9 @@ void InternetHandler::AddThirdPartyVpn(const base::ListValue* args) {
NET_LOG(ERROR) << "Empty app id for " << kAddThirdPartyVpnMessage;
return;
}
if (profile_ != GetProfileForPrimaryUser()) {
NET_LOG(ERROR) << "Only the primary user can add VPNs";
if (profile_ != GetProfileForPrimaryUser() || profile_->IsChild()) {
NET_LOG(ERROR)
<< "Only the primary user and non-child accounts can add VPNs";
return;
}
......
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