Skip to content

Username is required even though SharedUsername is set #9226

@ViliusS

Description

@ViliusS

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:

  1. 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"
        }
      }
    }
    
  2. Set PGADMIN_SERVER_JSON_FILE environment variable to point to the servers.json definition file.
  3. Start pgAdmin and observe the server list. It will be empty.
  4. Now add "Username": "postgres", into the list.
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions