mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-03 04:00:55 -06:00
Fixed an issue where the server is not able to connect using the service. Fixes #5841
This commit is contained in:
parent
1ee9cddceb
commit
458036ad6b
@ -23,4 +23,5 @@ Bug fixes
|
||||
| `Issue #5807 <https://redmine.postgresql.org/issues/5807>`_ - Fixed an issue where a column is renamed and then removed, then the drop SQL query takes the wrong column name.
|
||||
| `Issue #5830 <https://redmine.postgresql.org/issues/5830>`_ - Fixed reverse engineering SQL where parenthesis is not properly arranged for View/MView definition.
|
||||
| `Issue #5839 <https://redmine.postgresql.org/issues/5839>`_ - Ensure that multiple extensions can be dropped from the properties tab.
|
||||
| `Issue #5841 <https://redmine.postgresql.org/issues/5841>`_ - Fixed an issue where the server is not able to connect using the service.
|
||||
| `Issue #5845 <https://redmine.postgresql.org/issues/5845>`_ - Fixed an issue where the query tool is not fetching more than 1000 rows for the table does not have any primary key.
|
@ -194,14 +194,6 @@ class ServerModule(sg.ServerGroupPluginModule):
|
||||
# set to true
|
||||
continue
|
||||
|
||||
# if hide_shared_server or \
|
||||
# shared_server.name == auto_detected_server:
|
||||
# # Don't include shared server if hide shared server is
|
||||
# # set to true
|
||||
# continue
|
||||
|
||||
# if shared_server.name == auto_detected_server:
|
||||
# continue
|
||||
server = self.get_shared_server_properties(server,
|
||||
shared_server)
|
||||
connected = False
|
||||
@ -1280,8 +1272,9 @@ class ServerNode(PGChildNodeView):
|
||||
if server is None:
|
||||
return bad_request(self.not_found_error_msg())
|
||||
|
||||
# Return if username is blank
|
||||
if server.username is None:
|
||||
# Return if username is blank and the server is shared
|
||||
if server.username is None and not server.service and \
|
||||
server.shared:
|
||||
return make_json_response(
|
||||
status=200,
|
||||
success=0,
|
||||
@ -1819,6 +1812,7 @@ class ServerNode(PGChildNodeView):
|
||||
tunnel_identity_file=server.tunnel_identity_file,
|
||||
errmsg=errmsg,
|
||||
_=gettext,
|
||||
service=server.service,
|
||||
prompt_tunnel_password=prompt_tunnel_password,
|
||||
prompt_password=prompt_password
|
||||
)
|
||||
@ -1832,6 +1826,7 @@ class ServerNode(PGChildNodeView):
|
||||
server_label=server.name,
|
||||
username=server.username,
|
||||
errmsg=errmsg,
|
||||
service=server.service,
|
||||
_=gettext,
|
||||
)
|
||||
)
|
||||
|
@ -1208,7 +1208,7 @@ define('pgadmin.node.server', [
|
||||
$.get(server_url)
|
||||
.done(function(res) {
|
||||
if (res.shared && _.isNull(res.username) && data.user_id != current_user.id){
|
||||
if (selectedTreeNodeData._type == 'server'){
|
||||
if (selectedTreeNodeData._type == 'server' && !res.service){
|
||||
pgAdmin.Browser.Node.callbacks.show_obj_properties.call(
|
||||
pgAdmin.Browser.Nodes[tree.itemData(item)._type], {action: 'edit'}
|
||||
);
|
||||
|
@ -1,7 +1,13 @@
|
||||
<form name="frmPassword" id="frmPassword" style="height: 100%; width: 100%" onsubmit="return false;">
|
||||
<div>
|
||||
<div><span class="font-weight-bold" >{{ _('Please enter the password for the user \'{0}\' to connect the server - "{1}"').format(username,
|
||||
server_label) }}</span></div>
|
||||
<div><span class="font-weight-bold" >
|
||||
{% if service %}
|
||||
{{ _('Please enter the password for the user to connect the server - "{0}"').format(server_label) }}
|
||||
{% else %}
|
||||
{{ _('Please enter the password for the user \'{0}\' to connect the server - "{1}"').format(username,
|
||||
server_label) }}
|
||||
{% endif %}
|
||||
</span></div>
|
||||
<div class="input-group row py-2">
|
||||
<label for="password" class="col-sm-2 col-form-label" aria-hidden="true">{{ _('Password') }}</label>
|
||||
<div class="col-sm-10">
|
||||
|
@ -23,7 +23,13 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if prompt_password %}
|
||||
<div><label class="font-weight-bold" for="password">{{ _('Database server password for the user \'{0}\' to connect the server "{1}"').format(username, server_label) }}</label></div>
|
||||
<div><label class="font-weight-bold" for="password">
|
||||
{% if service %}
|
||||
{{ _('Database server password for the user to connect the server "{0}"').format(server_label) }}
|
||||
{% else %}
|
||||
{{ _('Database server password for the user \'{0}\' to connect the server "{1}"').format(username, server_label) }}
|
||||
{% endif %}
|
||||
</label></div>
|
||||
<div class="input-group py-2">
|
||||
<div class="w-100">
|
||||
<input id="password" class="form-control" name="password" type="password">
|
||||
|
Loading…
Reference in New Issue
Block a user