diff options
Diffstat (limited to '')
-rw-r--r-- | app/class/agent.class.php | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/app/class/agent.class.php b/app/class/agent.class.php index ed50b93..6d0e20d 100644 --- a/app/class/agent.class.php +++ b/app/class/agent.class.php @@ -12,7 +12,7 @@ * For more information, please refer to UNLICENSE */ -require_once "class/object.class.php"; +require_once "class/obj.class.php"; require_once "class/pad.class.php"; require_once "class/settings.class.php"; require_once "class/phpmailer.class.php"; @@ -22,7 +22,7 @@ require_once "class/smtp.class.php"; * This is a supertype for users and groups, since these two object types * will often be handled polymorphically and will share some functionality. */ -abstract class agent extends object +abstract class agent extends obj { /* * Constructor @@ -35,7 +35,7 @@ abstract class agent extends object /* * Check whether this agent is the owner of the given object */ - public function isOwnerOf(object $obj) : bool + public function isOwnerOf(obj $obj) : bool { return $obj->getOwner()->guid == $this->guid; } @@ -43,7 +43,7 @@ abstract class agent extends object /* * Check whether this agent is a member of the given object */ - public function isMemberOf(object $obj) : bool + public function isMemberOf(obj $obj) : bool { foreach ($obj->getMembers() as $memb) { @@ -114,7 +114,7 @@ abstract class agent extends object * Check whether this agent has access permission for given * object */ - public function canAccess(object $obj) : bool + public function canAccess(obj $obj) : bool { if ($this->admin) return true; @@ -130,13 +130,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canAccessSub($parent)) return true; } else if ($this->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canAccessSub($owner)) return true; } @@ -148,7 +148,7 @@ abstract class agent extends object * Check whether this agent has modify permission for given * object */ - public function canModify(object $obj) : bool + public function canModify(obj $obj) : bool { if ($this->admin) return true; @@ -161,13 +161,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySub($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySub($owner)) return true; } @@ -179,7 +179,7 @@ abstract class agent extends object * Check whether this agent has modify members permission for * given object */ - public function canModifyMembers(object $obj) : bool + public function canModifyMembers(obj $obj) : bool { if ($this->admin) return true; @@ -192,13 +192,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySubMembers($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySubMembers($owner)) return true; } @@ -210,7 +210,7 @@ abstract class agent extends object * Check whether this agent has modify permissions permission * for given object */ - public function canModifyPermissions(object $obj) : bool + public function canModifyPermissions(obj $obj) : bool { if ($this->admin) return true; @@ -220,13 +220,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySubPermissions($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySubPermissions($owner)) return true; } @@ -238,7 +238,7 @@ abstract class agent extends object * Check whether this agent has access-sub permission for * given object */ - public function canAccessSub(object $obj) : bool + public function canAccessSub(obj $obj) : bool { if ($this->admin) return true; @@ -254,13 +254,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canAccessSub($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canAccessSub($owner)) return true; } @@ -272,7 +272,7 @@ abstract class agent extends object * Check whether this agent has create-sub permission * for given object */ - public function canCreateSub(object $obj) : bool + public function canCreateSub(obj $obj) : bool { if ($this->admin) return true; @@ -288,13 +288,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canCreateSub($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canCreateSub($owner)) return true; } @@ -306,7 +306,7 @@ abstract class agent extends object * Check whether this agent has modify-sub permission * for given object */ - public function canModifySub(object $obj) : bool + public function canModifySub(obj $obj) : bool { if ($this->admin) return true; @@ -319,13 +319,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySub($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySub($owner)) return true; } @@ -337,7 +337,7 @@ abstract class agent extends object * Check whether this agent has modify-sub-members * permission for given object */ - public function canModifySubMembers(object $obj) : bool + public function canModifySubMembers(obj $obj) : bool { if ($this->admin) return true; @@ -350,13 +350,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySubMembers($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySubMembers($owner)) return true; } @@ -368,7 +368,7 @@ abstract class agent extends object * Check whether this agent has modify-sub-permissions * permission for given object */ - public function canModifySubPermissions(object $obj) : bool + public function canModifySubPermissions(obj $obj) : bool { if ($this->admin) return true; @@ -378,13 +378,13 @@ abstract class agent extends object if ($obj->parent) { - $parent = new object($obj->parent); + $parent = new obj($obj->parent); if ($this->canModifySubPermissions($parent)) return true; } else if ($obj->owner) { - $owner = new object($obj->owner); + $owner = new obj($obj->owner); if ($this->canModifySubPermissions($owner)) return true; } |