mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow debugging of functions in packages. Fixes #1948
This commit is contained in:
committed by
Dave Page
parent
070a9c077e
commit
5c7dcaba81
@@ -126,8 +126,14 @@ define([
|
||||
&& !treeInfo.server.user.is_superuser)
|
||||
return false;
|
||||
|
||||
// Fetch object owner
|
||||
var obj_owner = treeInfo.function && treeInfo.function.funcowner ||
|
||||
treeInfo.procedure && treeInfo.procedure.funcowner ||
|
||||
treeInfo.edbfunc && treeInfo.edbfunc.funcowner ||
|
||||
treeInfo.edbproc && treeInfo.edbproc.funcowner;
|
||||
|
||||
// Must be a super user or object owner to create breakpoints of any kind
|
||||
if (!(treeInfo.server.user.is_superuser || treeInfo.function.funcowner == treeInfo.server.user.name))
|
||||
if (!(treeInfo.server.user.is_superuser || obj_owner == treeInfo.server.user.name))
|
||||
return false;
|
||||
|
||||
// For trigger node, language will be undefined - we should allow indirect debugging for trigger node
|
||||
|
Reference in New Issue
Block a user