mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-15 09:53:50 -06:00
1) Ensure that the master password should be prompt when MASTER_PASSWORD_REQUIRED
is set to True and AUTHENTICATION_SOURCES is the webserver. Fixes #6928 2) Fixed an issue where the existing server group is disappeared on rename it. Fixes #6930
This commit is contained in:
parent
0f92f54452
commit
9e3165c0ff
@ -40,3 +40,5 @@ Bug fixes
|
||||
| `Issue #6908 <https://redmine.postgresql.org/issues/6908>`_ - Fixed an issue where each click to refresh the collection node, the number of objects decreasing by tens or more.
|
||||
| `Issue #6912 <https://redmine.postgresql.org/issues/6912>`_ - Fixed browser tree sort order regression issue.
|
||||
| `Issue #6915 <https://redmine.postgresql.org/issues/6915>`_ - Fixed an issue where the blank string is stored instead of NULL in the server table of SQLite database.
|
||||
| `Issue #6928 <https://redmine.postgresql.org/issues/6928>`_ - Ensure that the master password should be prompt when MASTER_PASSWORD_REQUIRED is set to True and AUTHENTICATION_SOURCES is webserver.
|
||||
| `Issue #6930 <https://redmine.postgresql.org/issues/6930>`_ - Fixed an issue where the existing server group is disappeared on rename it.
|
||||
|
@ -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 \
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user