diff --git a/docs/en_US/release_notes_7_8.rst b/docs/en_US/release_notes_7_8.rst index 27e1da077fe..27832341b1c 100644 --- a/docs/en_US/release_notes_7_8.rst +++ b/docs/en_US/release_notes_7_8.rst @@ -36,6 +36,7 @@ Bug fixes | `Issue #4995 `_ - Fixed an issue in ERD tool where the downloaded images have a few links cut. | `Issue #5749 `_ - Fixed an issue where user was not able to assign new/old columns as primary key once column with primary key is deleted. + | `Issue #6285 `_ - Add support for setting prepare threshold in server connection. | `Issue #6482 `_ - Fixed an issue where the wrong message "Current database has been moved or renamed" is displayed when debugging any function. | `Issue #6538 `_ - Fixed an issue where Processes tab displays wrong server name in some scenario. | `Issue #6579 `_ - Fix an issue where global/native keyboard shortcuts are not working when any cell of data output grid has focus. diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py b/web/pgadmin/browser/server_groups/servers/__init__.py index 08012b0b46d..0b2c23b1ce5 100644 --- a/web/pgadmin/browser/server_groups/servers/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/__init__.py @@ -401,8 +401,7 @@ def create_shared_server(data, gid): db.session.delete(shared_server) db.session.commit() - current_app.logger.exception(e) - return internal_server_error(errormsg=str(e)) + raise e @staticmethod def get_shared_server(server, gid): @@ -1203,6 +1202,7 @@ def create(self, gid): False) else 0, tunnel_identity_file=data.get('tunnel_identity_file', None), shared=data.get('shared', None), + shared_username=data.get('shared_username', None), passexec_cmd=data.get('passexec_cmd', None), passexec_expiration=data.get('passexec_expiration', None), kerberos_conn=1 if data.get('kerberos_conn', False) else 0, diff --git a/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js b/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js index e6365cb7136..4c9a6be7b5e 100644 --- a/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js +++ b/web/pgadmin/browser/server_groups/servers/static/js/server.ui.js @@ -136,11 +136,10 @@ export default class ServerSchema extends BaseUISchema { controlProps: { maxLength: 64}, mode: ['properties', 'create', 'edit'], deps: ['shared', 'username'], readonly: (s)=>{ - if(!this.origData.shared && s.shared) { - return false; - } - return true; - }, visible: (s)=>!obj.isShared(s), + return !(!this.origData.shared && s.shared); + }, visible: ()=>{ + return current_user.is_admin && pgAdmin.server_mode == 'True'; + }, depChange: (state, source, _topState, actionObj)=>{ let ret = {}; if(this.origData.shared) { diff --git a/web/pgadmin/dashboard/static/js/Dashboard.jsx b/web/pgadmin/dashboard/static/js/Dashboard.jsx index 5ab41de299b..46f6bdcb8c5 100644 --- a/web/pgadmin/dashboard/static/js/Dashboard.jsx +++ b/web/pgadmin/dashboard/static/js/Dashboard.jsx @@ -739,7 +739,7 @@ export default function Dashboard({ } else if (is_super_user) { // Super user can do anything return true; - } else if (current_user && current_user == treeNodeInfo.server.user?.name) { + } else if (current_user && current_user == row.original.usename) { // Non-super user can cancel only their active queries return true; } else {