mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where the user is not able to create a server if login with an LDAP account. Fixes #5439
Improved LDAP error messages.
This commit is contained in:
committed by
Akshay Joshi
parent
ed106e3577
commit
0f6abcc7fa
@@ -33,7 +33,7 @@ def get_storage_directory():
|
||||
if storage_dir is None:
|
||||
return None
|
||||
|
||||
username = current_user.email.split('@')[0]
|
||||
username = current_user.username.split('@')[0]
|
||||
if len(username) == 0 or username[0].isdigit():
|
||||
username = 'pga_user_' + username
|
||||
|
||||
@@ -48,7 +48,7 @@ def get_storage_directory():
|
||||
storage_dir = os.path.join(
|
||||
storage_dir.decode('utf-8') if hasattr(storage_dir, 'decode')
|
||||
else storage_dir,
|
||||
current_user.email.replace('@', '_')
|
||||
current_user.username.replace('@', '_')
|
||||
)
|
||||
|
||||
# Rename an old-style storage directory, if the new style doesn't exist
|
||||
|
||||
Reference in New Issue
Block a user