private function buildAccessRight($objAccessRight)
  {
    $accessRight = new \AccessRight($objAccessRight->id, $objAccessRight->member_group);
    $accessRight->categoryId = $objAccessRight->pid;
    $strRight = \AccessRight::READ;
    $accessRight->$strRight = $objAccessRight->right_read;
    $strRight = \AccessRight::UPLOAD;
    $accessRight->$strRight = $objAccessRight->right_upload;
    $strRight = \AccessRight::DELETE;
    $accessRight->$strRight = $objAccessRight->right_delete;
    $strRight = \AccessRight::EDIT;
    $accessRight->$strRight = $objAccessRight->right_edit;
    $strRight = \AccessRight::PUBLISH;
    $accessRight->$strRight = $objAccessRight->right_publish;
    $accessRight->active = $objAccessRight->published;
    $accessRight->activationStart = $objAccessRight->start;
    $accessRight->activationStop = $objAccessRight->stop;
    
    // HOOK: modify the access right
    if (isset($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight']) && is_array($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight']))
    {
      foreach ($GLOBALS['TL_HOOKS']['dmsModifyLoadedAccessRight'] as $callback)
      {
        $this->import($callback[0]);
        $accessRight = $this->{$callback[0]}->{$callback[1]}($accessRight, $objAccessRight);
      }
    }
    
    return $accessRight;
  }