Index: chrome/browser/ui/webui/signin/signin_create_profile_handler.cc |
diff --git a/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc b/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc |
index a0ab189cad311349c4c553cffe34fbb9caa648fc..229f86b8e4d2ae3d0b65984dc66528a55d573a06 100644 |
--- a/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc |
+++ b/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc |
@@ -573,11 +573,14 @@ void SigninCreateProfileHandler::LoadCustodianProfileCallback( |
return; |
} |
- // TODO(mahmadi): return proper error message if policy-controlled prefs |
- // prohibit adding supervised users (also disable the controls in the UI). |
PrefService* prefs = custodian_profile->GetPrefs(); |
- if (!prefs->GetBoolean(prefs::kSupervisedUserCreationAllowed)) |
+ if (!prefs->GetBoolean(prefs::kSupervisedUserCreationAllowed)) { |
+ ShowProfileCreationError( |
+ nullptr, |
+ l10n_util::GetStringUTF16( |
+ IDS_PROFILES_CREATE_SUPERVISED_NOT_ALLOWED_BY_POLICY)); |
return; |
+ } |
if (!supervised_user_id.empty()) { |
profile_creation_type_ = SUPERVISED_PROFILE_IMPORT; |