Commit f4430903 authored by Danan S's avatar Danan S Committed by Commit Bot

Suppress InlineLoginHandlerDialogChromeOS after Supervision enabled

We suppress the dialog in this instance because after an account has been
supervised because the user must sign out completely.

Bug: 1000904
Change-Id: I2df6f3b03d14516af8d81bdd3580eb5a498496c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786917Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Danan S <danan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693784}
parent afc68cb7
......@@ -54,6 +54,8 @@
#endif // defined(OS_ANDROID)
#if defined(OS_CHROMEOS)
#include "chrome/browser/supervised_user/supervised_user_service.h"
#include "chrome/browser/supervised_user/supervised_user_service_factory.h"
#include "chrome/browser/ui/settings_window_manager_chromeos.h"
#include "chrome/browser/ui/webui/signin/inline_login_handler_dialog_chromeos.h"
#include "chromeos/constants/chromeos_features.h"
......@@ -219,6 +221,15 @@ void ProcessMirrorHeaderUIThread(
chrome::SettingsWindowManager::GetInstance()->ShowOSSettings(
profile, chrome::kAccountManagerSubPage);
} else {
// Do not display the re-authentication dialog if this event was triggered
// by supervision being enabled for an account. In this situation, a
// complete signout is required.
SupervisedUserService* service =
SupervisedUserServiceFactory::GetForProfile(profile);
if (service && service->signout_required_after_supervision_enabled()) {
return;
}
// Display a re-authentication dialog.
chromeos::InlineLoginHandlerDialogChromeOS::Show(
manage_accounts_params.email);
......
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