pgadmin4
pgadmin4 copied to clipboard
Username is required even though SharedUsername is set
Describe the bug
Not sure if this is by design but when using SharedUsername in server definition the Username field is still required. If only SharedUsername is provided pgAdmin shows an error and server list is not populated.
To Reproduce
Steps to reproduce the behavior:
- Use the following servers.json definition file:
{ "Servers": { "mysharedserver": { "Name": "My Shared Server", "Group": "Shared Servers", "Host": "postgresql", "Port": 5432, "MaintenanceDB": "postgres", "Shared": true, "SharedUsername": "postgres" } } } - Set
PGADMIN_SERVER_JSON_FILEenvironment variable to point to the servers.json definition file. - Start pgAdmin and observe the server list. It will be empty.
- Now add
"Username": "postgres",into the list. - Restart pgAdmin. Server list is now correctly populated.
Expected behavior
If Shared Username is used there should be no need to duplicate it into two parameters.
Error message
'Username' attribute not found for server 'mysharedserver'
Desktop
- OS: Linux
- pgAdmin version: 9.8
- Mode: Server
- Browser (if running in server mode): Edge
- Package type: Container
One additional note: not sure if that is related, but Shared Username cannot be edited once the server definition is created.