1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 * 'cr-settings-user-list' shows a list of users whitelisted on this Chrome OS
12 * <cr-settings-user-list prefs="{{prefs}}">
13 * </cr-settings-user-list>
15 * @group Chrome Settings Elements
16 * @element cr-settings-user-list
19 is: 'cr-settings-user-list',
23 * Current list of whitelisted users.
24 * @type {!Array<!User>}
28 value: function() { return []; },
33 * Whether the user list is disabled, i.e. that no modifications can be
45 chrome.settingsPrivate.onPrefsChanged.addListener(function(prefs) {
46 prefs.forEach(function(pref) {
47 if (pref.key == 'cros.accounts.users') {
48 chrome.usersPrivate.getWhitelistedUsers(function(users) {
55 chrome.usersPrivate.getWhitelistedUsers(function(users) {
61 removeUser_: function(e) {
62 chrome.usersPrivate.removeWhitelistedUser(
63 e.model.item.email, /* callback */ function() {});
67 shouldHideCloseButton_: function(disabled, isUserOwner) {
68 return disabled || isUserOwner;