protected function getItems()
 {
     global $ilUser;
     include_once "Modules/Portfolio/classes/class.ilPortfolioAccessHandler.php";
     $access_handler = new ilPortfolioAccessHandler();
     include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
     $data = ilObjPortfolio::getPortfoliosOfUser($this->user_id);
     $this->shared_objects = $access_handler->getObjectsIShare(false);
     $this->setData($data);
 }
 protected function getItems()
 {
     global $ilUser;
     include_once "Services/Portfolio/classes/class.ilPortfolioAccessHandler.php";
     $access_handler = new ilPortfolioAccessHandler();
     include_once "Services/Portfolio/classes/class.ilObjPortfolio.php";
     $data = ilObjPortfolio::getPortfoliosOfUser($this->user_id);
     // remove all portfolios which are not shared
     if ($this->shared) {
         $other = $access_handler->getSharedObjects($this->user_id);
         foreach ($data as $idx => $item) {
             if (!in_array($item["id"], $other)) {
                 unset($data[$idx]);
             } else {
                 // #9848: flag if current share access is password-protected
                 $perms = $access_handler->getPermissions($item["id"]);
                 $data[$idx]["password"] = !in_array($ilUser->getId(), $perms) && !in_array(ilWorkspaceAccessGUI::PERMISSION_REGISTERED, $perms) && !in_array(ilWorkspaceAccessGUI::PERMISSION_ALL, $perms) && in_array(ilWorkspaceAccessGUI::PERMISSION_ALL_PASSWORD, $perms);
             }
         }
     } else {
         $this->shared_objects = $access_handler->getObjectsIShare();
     }
     $this->setData($data);
 }