mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added support to disable the auto-discovery of the database servers. Fixes #7039
This commit is contained in:
parent
fea44c07c7
commit
da5545ff57
@ -11,6 +11,7 @@ New features
|
||||
|
||||
| `Issue #6543 <https://redmine.postgresql.org/issues/6543>`_ - Added support for Two-factor authentication for improving security.
|
||||
| `Issue #6872 <https://redmine.postgresql.org/issues/6872>`_ - Include GSSAPI support in the PostgreSQL libraries and utilities on macOS.
|
||||
| `Issue #7039 <https://redmine.postgresql.org/issues/7039>`_ - Added support to disable the auto-discovery of the database servers.
|
||||
|
||||
Housekeeping
|
||||
************
|
||||
|
@ -782,6 +782,14 @@ ENABLE_PSQL = False
|
||||
##########################################################################
|
||||
ENABLE_BINARY_PATH_BROWSING = False
|
||||
|
||||
#############################################################################
|
||||
# AUTO_DISCOVER_SERVERS setting is used to enable the pgAdmin to discover the
|
||||
# database server automatically on the local machine.
|
||||
# When it is set to False, pgAdmin will not discover servers installed on
|
||||
# the local machine.
|
||||
#############################################################################
|
||||
AUTO_DISCOVER_SERVERS = True
|
||||
|
||||
##########################################################################
|
||||
# Local config settings
|
||||
##########################################################################
|
||||
|
@ -537,6 +537,12 @@ def create_app(app_name=None):
|
||||
##########################################################################
|
||||
@user_logged_in.connect_via(app)
|
||||
def on_user_logged_in(sender, user):
|
||||
|
||||
# If Auto Discover servers is turned off then return from the
|
||||
# function.
|
||||
if not config.AUTO_DISCOVER_SERVERS:
|
||||
return
|
||||
|
||||
# Keep hold of the user ID
|
||||
user_id = user.id
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user