Environment:
- pgAdmin 4: Latest version bundled with PostgreSQL 18
- PostgreSQL: 18
- OS: Windows 11
Issue:
When attempting to create a user using the CLI command:
the command fails with the following exception:
AttributeError: 'PgAdmin' object has no attribute 'login_manager'
Traceback excerpt:
ManageUsers.create_user()
-> ManageRoles.get_role()
-> create_app()
-> delete_adhoc_servers()
-> current_user
-> current_app.login_manager._load_user()
AttributeError: 'PgAdmin' object has no attribute 'login_manager'
Expected behavior:
- The add-user command should create a new pgAdmin user successfully.
Actual behavior:
- The command crashes before the user is created.
Notes:
- This occurs on a fresh installation using the latest pgAdmin version.
- The issue appears to happen during application initialization when delete_adhoc_servers() accesses current_user before login_manager has been initialized.
- pgAdmin itself is installed correctly; the failure occurs specifically in the CLI user-management path.
Environment:
Issue:
When attempting to create a user using the CLI command:
the command fails with the following exception:
Traceback excerpt:
Expected behavior:
Actual behavior:
Notes: