Fix issues found during testing. #6229, #6836

This commit is contained in:
Aditya Toshniwal 2023-10-12 16:58:46 +05:30
parent 10adb6a11b
commit 3a62fc5a2a
4 changed files with 8 additions and 8 deletions

View File

@ -36,6 +36,7 @@ Bug fixes
| `Issue #4995 <https://github.com/pgadmin-org/pgadmin4/issues/4995>`_ - Fixed an issue in ERD tool where the downloaded images have a few links cut. | `Issue #4995 <https://github.com/pgadmin-org/pgadmin4/issues/4995>`_ - Fixed an issue in ERD tool where the downloaded images have a few links cut.
| `Issue #5749 <https://github.com/pgadmin-org/pgadmin4/issues/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 #5749 <https://github.com/pgadmin-org/pgadmin4/issues/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 <https://github.com/pgadmin-org/pgadmin4/issues/6285>`_ - Add support for setting prepare threshold in server connection.
| `Issue #6482 <https://github.com/pgadmin-org/pgadmin4/issues/6482>`_ - Fixed an issue where the wrong message "Current database has been moved or renamed" is displayed when debugging any function. | `Issue #6482 <https://github.com/pgadmin-org/pgadmin4/issues/6482>`_ - Fixed an issue where the wrong message "Current database has been moved or renamed" is displayed when debugging any function.
| `Issue #6538 <https://github.com/pgadmin-org/pgadmin4/issues/6538>`_ - Fixed an issue where Processes tab displays wrong server name in some scenario. | `Issue #6538 <https://github.com/pgadmin-org/pgadmin4/issues/6538>`_ - Fixed an issue where Processes tab displays wrong server name in some scenario.
| `Issue #6579 <https://github.com/pgadmin-org/pgadmin4/issues/6579>`_ - Fix an issue where global/native keyboard shortcuts are not working when any cell of data output grid has focus. | `Issue #6579 <https://github.com/pgadmin-org/pgadmin4/issues/6579>`_ - Fix an issue where global/native keyboard shortcuts are not working when any cell of data output grid has focus.

View File

@ -401,8 +401,7 @@ class ServerModule(sg.ServerGroupPluginModule):
db.session.delete(shared_server) db.session.delete(shared_server)
db.session.commit() db.session.commit()
current_app.logger.exception(e) raise e
return internal_server_error(errormsg=str(e))
@staticmethod @staticmethod
def get_shared_server(server, gid): def get_shared_server(server, gid):
@ -1203,6 +1202,7 @@ class ServerNode(PGChildNodeView):
False) else 0, False) else 0,
tunnel_identity_file=data.get('tunnel_identity_file', None), tunnel_identity_file=data.get('tunnel_identity_file', None),
shared=data.get('shared', None), shared=data.get('shared', None),
shared_username=data.get('shared_username', None),
passexec_cmd=data.get('passexec_cmd', None), passexec_cmd=data.get('passexec_cmd', None),
passexec_expiration=data.get('passexec_expiration', None), passexec_expiration=data.get('passexec_expiration', None),
kerberos_conn=1 if data.get('kerberos_conn', False) else 0, kerberos_conn=1 if data.get('kerberos_conn', False) else 0,

View File

@ -136,11 +136,10 @@ export default class ServerSchema extends BaseUISchema {
controlProps: { maxLength: 64}, controlProps: { maxLength: 64},
mode: ['properties', 'create', 'edit'], deps: ['shared', 'username'], mode: ['properties', 'create', 'edit'], deps: ['shared', 'username'],
readonly: (s)=>{ readonly: (s)=>{
if(!this.origData.shared && s.shared) { return !(!this.origData.shared && s.shared);
return false; }, visible: ()=>{
} return current_user.is_admin && pgAdmin.server_mode == 'True';
return true; },
}, visible: (s)=>!obj.isShared(s),
depChange: (state, source, _topState, actionObj)=>{ depChange: (state, source, _topState, actionObj)=>{
let ret = {}; let ret = {};
if(this.origData.shared) { if(this.origData.shared) {

View File

@ -739,7 +739,7 @@ export default function Dashboard({
} else if (is_super_user) { } else if (is_super_user) {
// Super user can do anything // Super user can do anything
return true; 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 // Non-super user can cancel only their active queries
return true; return true;
} else { } else {