in app/addons/replication/components/newreplication.js [72:101]
checkLocalAccountCredentials(authType, auth, label, isLocal) {
// Skip check if it's a remote tb or not using BASIC auth
if (authType !== Constants.REPLICATION_AUTH_METHOD.BASIC || !isLocal) {
return FauxtonAPI.Promise.resolve(true);
}
if (!auth.username || !auth.password) {
const err = `Missing ${label} credentials.`;
FauxtonAPI.addNotification({
msg: err,
type: 'error',
clear: true
});
return FauxtonAPI.Promise.reject(new Error(err));
}
return this.checkCredentials(auth.username, auth.password).then((resp) => {
if (resp.error) {
throw (resp);
}
return true;
}).catch(err => {
FauxtonAPI.addNotification({
msg: `Your username or password for ${label} database is incorrect.`,
type: 'error',
clear: true
});
throw err;
});
}