CommonITILTask::canReadITILItem PHP 메소드

canReadITILItem() 공개 메소드

can read the parent ITIL Object ?
public canReadITILItem ( ) : boolean
리턴 boolean
    function canReadITILItem()
    {
        $itemtype = $this->getItilObjectItemType();
        $item = new $itemtype();
        if (!$item->can($this->getField($item->getForeignKeyField()), READ)) {
            return false;
        }
        return true;
    }

Usage Example

예제 #1
0
 /**
  * Is the current user have right to update the current task ?
  *
  * @return boolean
  **/
 function canUpdateItem()
 {
     if (!parent::canReadITILItem()) {
         return false;
     }
     if ($this->fields["users_id"] != Session::getLoginUserID() && !Session::haveRight('problem', UPDATE)) {
         return false;
     }
     return true;
 }
All Usage Examples Of CommonITILTask::canReadITILItem