Example #1
0
 /**
  * Is the current user have right to create the current task ?
  *
  * @return boolean
  **/
 function canCreateItem()
 {
     if (!parent::canReadITILItem()) {
         return false;
     }
     $problem = new Problem();
     if ($problem->getFromDB($this->fields['problems_id'])) {
         return Session::haveRight("edit_all_problem", "1") || Session::haveRight("show_my_problem", "1") && ($problem->isUser(CommonITILActor::ASSIGN, Session::getLoginUserID()) || isset($_SESSION["glpigroups"]) && $problem->haveAGroup(CommonITILActor::ASSIGN, $_SESSION['glpigroups']));
     }
     return false;
 }