diff --git a/include/class.auth.php b/include/class.auth.php index e6fed10c5089badd4597d9ab220964b717964281..b115258952323bd069ece521c8643b7211f5fa45 100644 --- a/include/class.auth.php +++ b/include/class.auth.php @@ -4,7 +4,7 @@ interface AuthenticatedUser { // Get basic information function getId(); function getUsername(); - function getRole(); + function getUserType(); //Backend used to authenticate the user function getAuthBackend(); @@ -30,7 +30,7 @@ implements AuthenticatedUser { // Get basic information abstract function getId(); abstract function getUsername(); - abstract function getRole(); + abstract function getUserType(); //Backend used to authenticate the user abstract function getAuthBackend(); diff --git a/include/class.client.php b/include/class.client.php index a8b39d1e5135bc69e01fccf9ef711bfbf32b613b..39b8241c9da43a839e70770f5632a8d236b94abf 100644 --- a/include/class.client.php +++ b/include/class.client.php @@ -232,7 +232,7 @@ class EndUser extends BaseAuthenticatedUser { return $this->user->getEmail(); } - function getRole() { + function getUserType() { return $this->isOwner() ? 'owner' : 'collaborator'; } diff --git a/include/class.staff.php b/include/class.staff.php index ebdce1aaa0aa7da41cd0316fe33b897f903b2831..01af86260fa795274201de4872e8ae8b7ed7a80f 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -79,7 +79,7 @@ implements AuthenticatedUser { // AuthenticatedUser implementation... // TODO: Move to an abstract class that extends Staff - function getRole() { + function getUserType() { return 'staff'; } diff --git a/include/class.ticket.php b/include/class.ticket.php index 8422e8eef42ca79c87a53ef894911f2b121786dc..a4afc52f9e2b6733ab853b66f47274760840f0c3 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -321,7 +321,7 @@ class Ticket { //Collaborator? // 1) If the user was authorized via this ticket. if ($user->getTicketId() == $this->getId() - && !strcasecmp($user->getRole(), 'collaborator')) + && !strcasecmp($user->getUserType(), 'collaborator')) return true; // 2) Query the database to check for expanded access...