Commit 0b2e941e authored by Tomasz Dobrowolski's avatar Tomasz Dobrowolski Committed by Commit Bot

Fix SSO credential error reporting in file share dialog.

Set SSO credential error as general error instead of credential error,
which displays error under username/password and is invisible in SSO.

Reset error state after changing authentication method.

Bug: 1038896
Change-Id: I27fcd9b3eb4e045f2e37de9c76ae932a59b7305c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1978687
Commit-Queue: Tomasz Dobrowolski <tomdobro@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarAnand Mistry <amistry@chromium.org>
Auto-Submit: Tomasz Dobrowolski <tomdobro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733940}
parent e9e0da37
...@@ -106,6 +106,7 @@ Polymer({ ...@@ -106,6 +106,7 @@ Polymer({
SmbAuthMethod.KERBEROS : SmbAuthMethod.KERBEROS :
SmbAuthMethod.CREDENTIALS; SmbAuthMethod.CREDENTIALS;
}, },
observer: 'onAuthenticationMethodChanged_',
}, },
/** @private */ /** @private */
...@@ -172,6 +173,15 @@ Polymer({ ...@@ -172,6 +173,15 @@ Polymer({
this.mountName_ = parts[parts.length - 1]; this.mountName_ = parts[parts.length - 1];
}, },
/**
* @param {string} newValue
* @param {string} oldValue
* @private
*/
onAuthenticationMethodChanged_(newValue, oldValue) {
this.resetErrorState_();
},
/** /**
* @return {boolean} * @return {boolean}
* @private * @private
...@@ -223,8 +233,13 @@ Polymer({ ...@@ -223,8 +233,13 @@ Polymer({
switch (result) { switch (result) {
// Credential Error // Credential Error
case SmbMountResult.AUTHENTICATION_FAILED: case SmbMountResult.AUTHENTICATION_FAILED:
this.setCredentialError_( if (this.authenticationMethod_ === SmbAuthMethod.KERBEROS) {
loadTimeData.getString('smbShareAddedAuthFailedMessage')); this.setGeneralError_(
loadTimeData.getString('smbShareAddedAuthFailedMessage'));
} else {
this.setCredentialError_(
loadTimeData.getString('smbShareAddedAuthFailedMessage'));
}
break; break;
// Path Errors // Path Errors
......
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