diff options
author | Malf Furious <m@lfurio.us> | 2018-09-24 12:55:21 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-09-24 12:55:21 -0400 |
commit | fbb9bcb787287597a0666b9313a4754ed03d242b (patch) | |
tree | 23c9b8fff3bb80b6fa99ae1ba2977844a19e19a5 /app/class/agent.class.php | |
parent | c928adca5d7cd40a786da830ecea78369072fc19 (diff) | |
download | scrott-fbb9bcb787287597a0666b9313a4754ed03d242b.tar.gz scrott-fbb9bcb787287597a0666b9313a4754ed03d242b.zip |
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).
Diffstat (limited to '')
-rw-r--r-- | app/class/agent.class.php | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |