mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that internal authentication when combined with other authentication providers, the order of internal source should not matter while picking up the provider. Fixes #6832
This commit is contained in:
committed by
Akshay Joshi
parent
36e5708464
commit
572b5a126a
@@ -104,7 +104,13 @@ if config.SERVER_MODE:
|
||||
|
||||
# Authentication sources
|
||||
if len(config.AUTHENTICATION_SOURCES) > 0:
|
||||
app.PGADMIN_EXTERNAL_AUTH_SOURCE = config.AUTHENTICATION_SOURCES[0]
|
||||
# Creating a temporary auth source list removing INTERNAL
|
||||
# This change is done to avoid selecting INTERNAL authentication when user
|
||||
# mistakenly keeps that the first option.
|
||||
auth_source = [x for x in config.AUTHENTICATION_SOURCES
|
||||
if x != INTERNAL]
|
||||
app.PGADMIN_EXTERNAL_AUTH_SOURCE = auth_source[0] \
|
||||
if len(auth_source) > 0 else INTERNAL
|
||||
else:
|
||||
app.PGADMIN_EXTERNAL_AUTH_SOURCE = INTERNAL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user