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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 2189163002: Add remove non-device-owner user removal confirmation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 4 years, 5 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
« no previous file with comments | « ui/login/account_picker/user_pod_row.css ('k') | ui/login/account_picker/user_pod_template.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index 646f31b3e948889d7019c76dfb1a7b5661c87f4d..ae6522b1101127f1601977f7a43d7ab0ed462059 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -1527,12 +1527,7 @@ cr.define('login', function() {
* @param {Event} e Click event.
*/
handleRemoveCommandClick_: function(e) {
- if (this.user.legacySupervisedUser || this.user.isDesktopUser) {
- this.showRemoveWarning_();
- return;
- }
- if (this.isActionBoxMenuActive)
- chrome.send('removeUser', [this.user.username]);
+ this.showRemoveWarning_();
},
/**
@@ -1555,8 +1550,8 @@ cr.define('login', function() {
},
/**
- * Shows remove user warning. Used for legacy supervised users on CrOS, and
- * for all users on desktop.
+ * Shows remove user warning. Used for legacy supervised users
+ * and non-device-owner on CrOS, and for all users on desktop.
*/
showRemoveWarning_: function() {
this.actionBoxMenuRemoveElement.hidden = true;
@@ -1564,9 +1559,11 @@ cr.define('login', function() {
// Show extra statistics information for desktop users
var message;
- if (this.user.isLegacySupervisedUser) {
+ if (!this.user.isDesktopUser) {
this.moveActionMenuUpIfNeeded_();
} else {
+ this.querySelector(
+ '.action-box-remove-non-owner-user-warning-text').hidden = true;
this.RemoveWarningDialogSetMessage_(true, false);
// set a global handler for the callback
window.updateRemoveWarningDialog =
@@ -1743,14 +1740,8 @@ cr.define('login', function() {
return;
switch (e.key) {
case 'Enter':
- if (this.user.legacySupervisedUser || this.user.isDesktopUser) {
- // Prevent default so that we don't trigger a 'click' event on the
- // remove button that will be focused.
- e.preventDefault();
- this.showRemoveWarning_();
- } else {
- this.removeUser(this.user);
- }
+ e.preventDefault();
+ this.showRemoveWarning_();
e.stopPropagation();
break;
case 'ArrowUp':
« no previous file with comments | « ui/login/account_picker/user_pod_row.css ('k') | ui/login/account_picker/user_pod_template.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698