/**
  * Loads all roles
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the authenticated user is not allowed to read the roles
  *
  * @return \eZ\Publish\API\Repository\Values\User\Role[]
  */
 public function loadRoles()
 {
     if ($this->repository->hasAccess('role', 'read') !== true) {
         throw new UnauthorizedException('role', 'read');
     }
     $spiRoles = $this->userHandler->loadRoles();
     $roles = array();
     foreach ($spiRoles as $spiRole) {
         $roles[] = $this->buildDomainRoleObject($spiRole);
     }
     return $roles;
 }