mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-10 07:26:01 -06:00
Added configurable parameter to enable support for PasswordExecCommand in server mode. #6792
This commit is contained in:
parent
b28df5874e
commit
2d08b0dd13
@ -909,6 +909,14 @@ AUTO_DISCOVER_SERVERS = True
|
||||
#############################################################################
|
||||
SERVER_HEARTBEAT_TIMEOUT = 30 # In seconds
|
||||
|
||||
#############################################################################
|
||||
# ENABLE_SERVER_PASS_EXEC_CMD is used to enable/disable Password exec command
|
||||
# field in server properties. This is used to specify a shell command to be
|
||||
# executed to retrieve a password to be used for server authentication.
|
||||
# This setting is applicable only for server mode.
|
||||
#############################################################################
|
||||
ENABLE_SERVER_PASS_EXEC_CMD = False
|
||||
|
||||
#############################################################################
|
||||
# Patch the default config with custom config and other manipulations
|
||||
#############################################################################
|
||||
|
@ -568,6 +568,7 @@ def utils():
|
||||
shared_storage_list=shared_storage_list,
|
||||
restricted_shared_storage_list=[] if current_user.has_role(
|
||||
"Administrator") else restricted_shared_storage_list,
|
||||
enable_server_passexec_cmd=config.ENABLE_SERVER_PASS_EXEC_CMD,
|
||||
),
|
||||
200, {'Content-Type': MIMETYPE_APP_JS})
|
||||
|
||||
|
@ -347,7 +347,7 @@ export default class ServerSchema extends BaseUISchema {
|
||||
id: 'passexec_cmd', label: gettext('Password exec command'), type: 'text',
|
||||
group: gettext('Advanced'), controlProps: {maxLength: null},
|
||||
mode: ['properties', 'edit', 'create'],
|
||||
disabled: pgAdmin.server_mode == 'True',
|
||||
disabled: pgAdmin.server_mode == 'True' && pgAdmin.enable_server_passexec_cmd == 'False',
|
||||
},
|
||||
{
|
||||
id: 'passexec_expiration', label: gettext('Password exec expiration (seconds)'), type: 'int',
|
||||
|
@ -71,6 +71,9 @@ define('pgadmin.browser.utils',
|
||||
/* Minimum password length */
|
||||
pgAdmin['password_length_min'] = '{{password_length_min}}';
|
||||
|
||||
/* Enable server password exec command */
|
||||
pgAdmin['enable_server_passexec_cmd'] = '{{enable_server_passexec_cmd}}';
|
||||
|
||||
// Define list of nodes on which Query tool option doesn't appears
|
||||
let unsupported_nodes = pgAdmin.unsupported_nodes = [
|
||||
'server_group', 'server', 'coll-tablespace', 'tablespace',
|
||||
|
Loading…
Reference in New Issue
Block a user