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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 17546004: Added policy for disabling locally managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Little fix. Created 7 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/chromeos/login/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index 505746bb46f2bdca1bcd576c46d83d701346384d..2006de24676d17901660d71d9912593b6209dd83 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -181,8 +181,10 @@ void ExistingUserController::UpdateLoginDisplay(const UserList& users) {
if (show_users_on_signin) {
for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
// TODO(xiyuan): Clean user profile whose email is not in whitelist.
- if (LoginUtils::IsWhitelisted((*it)->email()) ||
- (*it)->GetType() != User::USER_TYPE_REGULAR) {
+ if (((*it)->GetType() != User::USER_TYPE_LOCALLY_MANAGED ||
Denis Kuznetsov (DE-MUC) 2013/06/21 12:28:52 Please extract this as a boolean var, so that it w
dzhioev (left Google) 2013/06/21 13:42:29 Done.
+ UserManager::Get()->AreLocallyManagedUsersAllowed()) &&
+ (LoginUtils::IsWhitelisted((*it)->email()) ||
+ (*it)->GetType() != User::USER_TYPE_REGULAR)) {
filtered_users.push_back(*it);
}
}
@@ -438,6 +440,11 @@ void ExistingUserController::PerformLogin(
is_login_in_progress_ = true;
if (gaia::ExtractDomainName(user_context.username) ==
UserManager::kLocallyManagedUserDomain) {
+ if (!UserManager::Get()->AreLocallyManagedUsersAllowed()) {
+ LOG(ERROR) << "Login attempt of locally managed user detected.";
+ login_display_->SetUIEnabled(true);
+ return;
+ }
login_performer_->LoginAsLocallyManagedUser(
UserContext(user_context.username,
user_context.password,

Powered by Google App Engine
This is Rietveld 408576698