public function on_load_resource($pars = array())
{
$ticket = $pars['ticket'];
$path = $pars['path'];
if (!$this->isAuthenticated($ticket)) {
self::raiseError("Unauthenticated.");
}
if ($this->canUserRead($ticket, $path)) {
$resource = $this->getResource($ticket, $path);
self::setResult($resource);
}
self::raiseError("Insufficient privileges.");
}