diff --git a/docs/en_US/release_notes_6_1.rst b/docs/en_US/release_notes_6_1.rst index ee65897bf..4d9b572b6 100644 --- a/docs/en_US/release_notes_6_1.rst +++ b/docs/en_US/release_notes_6_1.rst @@ -40,3 +40,5 @@ Bug fixes | `Issue #6908 `_ - Fixed an issue where each click to refresh the collection node, the number of objects decreasing by tens or more. | `Issue #6912 `_ - Fixed browser tree sort order regression issue. | `Issue #6915 `_ - Fixed an issue where the blank string is stored instead of NULL in the server table of SQLite database. +| `Issue #6928 `_ - Ensure that the master password should be prompt when MASTER_PASSWORD_REQUIRED is set to True and AUTHENTICATION_SOURCES is webserver. +| `Issue #6930 `_ - Fixed an issue where the existing server group is disappeared on rename it. diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py index 79d08fac9..4eaef9bdb 100644 --- a/web/pgadmin/browser/__init__.py +++ b/web/pgadmin/browser/__init__.py @@ -51,7 +51,7 @@ from pgadmin.utils.master_password import validate_master_password, \ set_crypt_key, process_masterpass_disabled from pgadmin.model import User from pgadmin.utils.constants import MIMETYPE_APP_JS, PGADMIN_NODE,\ - INTERNAL, KERBEROS, LDAP, QT_DEFAULT_PLACEHOLDER, OAUTH2 + INTERNAL, KERBEROS, LDAP, QT_DEFAULT_PLACEHOLDER, OAUTH2, WEBSERVER from pgadmin.authenticate import AuthSourceManager try: @@ -1000,6 +1000,7 @@ def set_master_password(): # Enable master password if oauth is used if not config.SERVER_MODE or OAUTH2 in config.AUTHENTICATION_SOURCES \ or KERBEROS in config.AUTHENTICATION_SOURCES \ + or WEBSERVER in config.AUTHENTICATION_SOURCES \ and config.MASTER_PASSWORD_REQUIRED: # if master pass is set previously if current_user.masterpass_check is not None and \ diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js index f88fb6584..e1e025f9b 100644 --- a/web/pgadmin/browser/static/js/browser.js +++ b/web/pgadmin/browser/static/js/browser.js @@ -1267,7 +1267,8 @@ define('pgadmin.browser', [ var _parent = this.t.parent(this.i) || null; // If there is no parent then just update the node - if(_parent && _parent.length == 0 && ctx.op == 'UPDATE') { + if(this.t.isRootNode(_parent) || + (_parent && _parent.length == 0 && ctx.op == 'UPDATE')) { updateNode(); } else { var postRemove = function() { diff --git a/web/pgadmin/static/js/tree/tree.js b/web/pgadmin/static/js/tree/tree.js index 05582cee9..3ca4ee533 100644 --- a/web/pgadmin/static/js/tree/tree.js +++ b/web/pgadmin/static/js/tree/tree.js @@ -205,11 +205,11 @@ export class Tree { first(item) { const model = this.tree.getModel(); - if (item === undefined || item === null) { + if ((item === undefined || item === null) && model.root.children !== null) { return model.root.children[0]; } - if (item.branchSize > 0) { + if (item !== undefined && item !== null && item.branchSize > 0) { return item.children[0]; } @@ -285,6 +285,11 @@ export class Tree { return (item !== undefined && item.getMetadata('data') !== undefined) ? item._metadata.data : []; } + isRootNode(item) { + const model = this.tree.getModel(); + return item === model.root; + } + isInode(item) { const children = this.children(item); if (children === null || children === undefined) return false;