Allow debugging of functions in packages. Fixes #1948

This commit is contained in:
Murtuza Zabuawala
2017-07-03 16:30:12 +01:00
committed by Dave Page
parent 070a9c077e
commit 5c7dcaba81
6 changed files with 19 additions and 7 deletions

View File

@@ -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