mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the master password dialog is popped up if the crypt key is missing. Fixes #6960
This commit is contained in:
@@ -530,17 +530,11 @@ function SchemaDialogView({
|
||||
});
|
||||
setFormReady(true);
|
||||
setLoaderText('');
|
||||
}).catch((err)=>{
|
||||
}).catch(()=>{
|
||||
if(unmounted) {
|
||||
return;
|
||||
}
|
||||
setLoaderText('');
|
||||
if (err.response && err.response.data && err.response.data.errormsg) {
|
||||
Notify.alert(
|
||||
gettext(err.response.statusText),
|
||||
gettext(err.response.data.errormsg)
|
||||
);
|
||||
}
|
||||
});
|
||||
/* Clear the focus timeout if unmounted */
|
||||
return ()=>{
|
||||
@@ -819,14 +813,8 @@ function SchemaPropertiesView({
|
||||
setOrigData(data || {});
|
||||
setLoaderText('');
|
||||
}
|
||||
}).catch((err)=>{
|
||||
}).catch(()=>{
|
||||
setLoaderText('');
|
||||
if (err.response && err.response.data && err.response.data.errormsg) {
|
||||
Notify.alert(
|
||||
gettext(err.response.statusText),
|
||||
gettext(err.response.data.errormsg)
|
||||
);
|
||||
}
|
||||
});
|
||||
}, [getInitData]);
|
||||
|
||||
|
||||
@@ -196,10 +196,14 @@ var Notifier = {
|
||||
|
||||
if(resp.info == 'CRYPTKEY_MISSING') {
|
||||
var pgBrowser = window.pgAdmin.Browser;
|
||||
pgBrowser.set_master_password('', ()=> {
|
||||
pgBrowser.set_master_password('', false, ()=> {
|
||||
if(onJSONResult && typeof(onJSONResult) == 'function') {
|
||||
onJSONResult('CRYPTKEY_SET');
|
||||
}
|
||||
}, ()=> {
|
||||
if(onJSONResult && typeof(onJSONResult) == 'function') {
|
||||
onJSONResult('CRYPTKEY_NOT_SET');
|
||||
}
|
||||
});
|
||||
return;
|
||||
} else if (resp.result != null && (!resp.errormsg || resp.errormsg == '') &&
|
||||
|
||||
Reference in New Issue
Block a user