From fbb9bcb787287597a0666b9313a4754ed03d242b Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Mon, 24 Sep 2018 12:55:21 -0400 Subject: agent: Fix bug in function canAccess() This is probabally more of an oops than a bug, although was causing unexpected behavior. When falling back to checking whether the agent has access to the object's owner, it was wrongly accessing through $this->owner, rather than $obj->owner (which is the function argument). This was probabally left over from how this function _used_ to be implemented (you would call on the object and pass in the user). --- app/class/agent.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/class/agent.class.php') diff --git a/app/class/agent.class.php b/app/class/agent.class.php index 63a21ed..c8e6436 100644 --- a/app/class/agent.class.php +++ b/app/class/agent.class.php @@ -157,7 +157,7 @@ abstract class agent extends obj if ($this->canAccessSub($parent)) return true; } - else if ($this->owner) + else if ($obj->owner) { $owner = new obj($obj->owner); if ($this->canAccessSub($owner)) -- cgit v1.2.3