1. Added Master Password to increase the security of saved passwords. Fixes #4184

2. In server(web) mode, update all the saved server credentials when user password is changed. Fixes #3377
This commit is contained in:
Aditya Toshniwal
2019-05-28 12:00:18 +05:30
committed by Akshay Joshi
parent 6f0eafb223
commit dfa892d2a2
44 changed files with 1509 additions and 416 deletions

View File

@@ -607,32 +607,42 @@ define([
*/
$('.wizard-progress-bar p').show();
coll.fetch({
success: function(c, xhr) {
$('.wizard-progress-bar p').html('');
$('.wizard-progress-bar').hide();
c.set(xhr.result, {parse: true});
// If some objects failed while fetching then we will notify the user
if (xhr && xhr.info && xhr.info !== '') {
$('.pg-prop-status-bar .alert-text').html(xhr.info);
$('.pg-prop-status-bar').css('visibility', 'visible');
}
},
error: function(m, xhr) {
// If the main request fails as whole then
let msg;
if (xhr && xhr.responseJSON && xhr.responseJSON.errormsg) {
msg = xhr.responseJSON.errormsg;
}
var fetchAjaxHook = function() {
$('.wizard-progress-bar p').removeClass('alert-danger').addClass('alert-info');
$('.wizard-progress-bar p').text(gettext('Please wait while fetching records...'));
coll.fetch({
success: function(c, xhr) {
$('.wizard-progress-bar p').html('');
$('.wizard-progress-bar').hide();
c.set(xhr.result, {parse: true});
// If some objects failed while fetching then we will notify the user
if (xhr && xhr.info && xhr.info !== '') {
$('.pg-prop-status-bar .alert-text').html(xhr.info);
$('.pg-prop-status-bar').css('visibility', 'visible');
}
},
error: function(model, xhr, options) {
// If the main request fails as whole then
$('.wizard-progress-bar p').removeClass('alert-info').addClass('alert-danger');
$('.wizard-progress-bar p').text(gettext('Unable to fetch the database objects'));
if(!msg) {
msg = gettext('Unable to fetch the database objects due to an error');
}
$('.wizard-progress-bar p').removeClass('alert-info').addClass('alert-danger');
$('.wizard-progress-bar p').text(msg);
},
reset: true,
}, this);
Alertify.pgNotifier(
options.textStatus, xhr,
gettext('Unable to fetch the database objects'),
function(msg) {
if(msg === 'CRYPTKEY_SET') {
fetchAjaxHook();
} else {
$('.wizard-progress-bar p').removeClass('alert-info').addClass('alert-danger');
$('.wizard-progress-bar p').text(msg);
}
}
);
},
reset: true,
}, this);
};
fetchAjaxHook();
//////////////////////////////////////////////////////////////////////
// //