Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5904)

Unified Diff: chrome/browser/ui/webui/signin/signin_create_profile_handler.cc

Issue 2058083002: MD User Manager: Error message if pref doesn't allow creating supervised user. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/webui/signin/signin_create_profile_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698