mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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:
committed by
Akshay Joshi
parent
6f0eafb223
commit
dfa892d2a2
@@ -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();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
|
||||
Reference in New Issue
Block a user