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

Side by Side Diff: chrome/browser/resources/chromeos/login/offline_ad_login.js

Issue 2653913002: Check username validity in the FakeAuthPolicyClient (Closed)
Patch Set: Comments Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | chromeos/chromeos.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer element for displaying AD domain joining and AD 6 * @fileoverview Polymer element for displaying AD domain joining and AD
7 * Authenticate user screens. 7 * Authenticate user screens.
8 */ 8 */
9 // Possible error states of the screen. Must be in the same order as 9 // Possible error states of the screen. Must be in the same order as
10 // ActiveDirectoryErrorState enum values. 10 // ActiveDirectoryErrorState enum values.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 case ACTIVE_DIRECTORY_ERROR_STATE.BAD_PASSWORD: 117 case ACTIVE_DIRECTORY_ERROR_STATE.BAD_PASSWORD:
118 this.$.passwordInput.isInvalid = true; 118 this.$.passwordInput.isInvalid = true;
119 break; 119 break;
120 } 120 }
121 }, 121 },
122 122
123 /** @private */ 123 /** @private */
124 onSubmit_: function() { 124 onSubmit_: function() {
125 if (this.showMachineInput && !this.$.machineNameInput.checkValidity()) 125 if (this.showMachineInput && !this.$.machineNameInput.checkValidity())
126 return; 126 return;
127 if (!this.$.userInput.checkValidity())
128 return;
127 if (!this.$.passwordInput.checkValidity()) 129 if (!this.$.passwordInput.checkValidity())
128 return; 130 return;
129 var user = /** @type {string} */ (this.$.userInput.value); 131 var user = /** @type {string} */ (this.$.userInput.value);
130 if (!user.includes('@') && this.userRealm) 132 if (!user.includes('@') && this.userRealm)
131 user += this.userRealm; 133 user += this.userRealm;
132 var msg = { 134 var msg = {
133 'machinename': this.$.machineNameInput.value, 135 'machinename': this.$.machineNameInput.value,
134 'username': user, 136 'username': user,
135 'password': this.$.passwordInput.value 137 'password': this.$.passwordInput.value
136 }; 138 };
137 this.$.passwordInput.value = ''; 139 this.$.passwordInput.value = '';
138 this.fire('authCompleted', msg); 140 this.fire('authCompleted', msg);
139 }, 141 },
140 }); 142 });
OLDNEW
« no previous file with comments | « no previous file | chromeos/chromeos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698