OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-users-page' is the settings page for managing user accounts on | 7 * 'settings-users-page' is the settings page for managing user accounts on |
8 * the device. | 8 * the device. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 /** @private */ | 28 /** @private */ |
29 isWhitelistManaged_: { | 29 isWhitelistManaged_: { |
30 type: Boolean, | 30 type: Boolean, |
31 value: false, | 31 value: false, |
32 }, | 32 }, |
33 }, | 33 }, |
34 | 34 |
35 /** @override */ | 35 /** @override */ |
36 created: function() { | 36 created: function() { |
37 chrome.usersPrivate.isCurrentUserOwner(function(isOwner) { | 37 chrome.usersPrivate.isCurrentUserOwner(isOwner => { |
38 this.isOwner_ = isOwner; | 38 this.isOwner_ = isOwner; |
39 }.bind(this)); | 39 }); |
40 | 40 |
41 chrome.usersPrivate.isWhitelistManaged(function(isWhitelistManaged) { | 41 chrome.usersPrivate.isWhitelistManaged(isWhitelistManaged => { |
42 this.isWhitelistManaged_ = isWhitelistManaged; | 42 this.isWhitelistManaged_ = isWhitelistManaged; |
43 }.bind(this)); | 43 }); |
44 }, | 44 }, |
45 | 45 |
46 /** | 46 /** |
47 * @param {!Event} e | 47 * @param {!Event} e |
48 * @private | 48 * @private |
49 */ | 49 */ |
50 openAddUserDialog_: function(e) { | 50 openAddUserDialog_: function(e) { |
51 e.preventDefault(); | 51 e.preventDefault(); |
52 this.$.addUserDialog.open(); | 52 this.$.addUserDialog.open(); |
53 }, | 53 }, |
(...skipping 17 matching lines...) Expand all Loading... |
71 * @param {boolean} isOwner | 71 * @param {boolean} isOwner |
72 * @param {boolean} isWhitelistManaged | 72 * @param {boolean} isWhitelistManaged |
73 * @param {boolean} allowGuest | 73 * @param {boolean} allowGuest |
74 * @private | 74 * @private |
75 * @return {boolean} | 75 * @return {boolean} |
76 */ | 76 */ |
77 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) { | 77 isEditingUsersDisabled_: function(isOwner, isWhitelistManaged, allowGuest) { |
78 return !isOwner || isWhitelistManaged || allowGuest; | 78 return !isOwner || isWhitelistManaged || allowGuest; |
79 } | 79 } |
80 }); | 80 }); |
OLD | NEW |