diff options
author | Malf Furious <m@lfurio.us> | 2018-07-22 02:43:02 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-07-22 02:43:02 -0400 |
commit | 6c03cc537c5794a131278583f83477bbd15e0e3e (patch) | |
tree | 21e9e7ebd72bfd6e8bbd59e51b76ddd4c83ccb65 | |
parent | 3eaf6f3b990d86069453b1bda4ed377e67ccf571 (diff) | |
download | scrott-6c03cc537c5794a131278583f83477bbd15e0e3e.tar.gz scrott-6c03cc537c5794a131278583f83477bbd15e0e3e.zip |
Fix bug in agent 'has permission' functions
The check that this commit adds to each of these functions enables users
with all permissions on themselves.
-rw-r--r-- | app/class/agent.class.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/class/agent.class.php b/app/class/agent.class.php index b4e6702..4af13d5 100644 --- a/app/class/agent.class.php +++ b/app/class/agent.class.php @@ -122,6 +122,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; @@ -156,6 +159,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; @@ -187,6 +193,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; @@ -218,6 +227,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; @@ -246,6 +258,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; @@ -280,6 +295,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; @@ -314,6 +332,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; @@ -345,6 +366,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; @@ -376,6 +400,9 @@ abstract class agent extends obj if ($this->admin) return true; + if ($this->guid == $obj->guid) + return true; + if ($this->isOwnerOf($obj)) return true; |