For change server password we have added check is_connected() in server.js. Also same function is also available in database.js. So it was causing change server password menu to enable on database node as well if database is connected.
This issue will appear for any other menu if that menu has check on is_connected function.
In that case - we're fixing it at wrong end.
We need make the menu educate about the node type it supports, and enable/disable it accordingly.
Please modify the 'update' function 'pgAdmin.Browser.MenuItem' class in 'web/pgadmin/browser/static/js/menu.js' accordingly.