/** * Is the current user have right to create the current task ? * * @return boolean **/ function canCreateItem() { if (!parent::canReadITILItem()) { return false; } $change = new Change(); if ($change->getFromDB($this->fields['changes_id'])) { return Session::haveRight('change', UPDATE) || Session::haveRight('change', Change::READMY) && ($change->isUser(CommonITILActor::ASSIGN, Session::getLoginUserID()) || isset($_SESSION["glpigroups"]) && $change->haveAGroup(CommonITILActor::ASSIGN, $_SESSION['glpigroups'])); } return false; }