CommonDBTM::checkEntity PHP Method

checkEntity() public method

Check if have right on this entity
public checkEntity ( $recursive = false ) : booleen
$recursive boolean set true to accept recursive items of ancestors of active entities (View case for example) (default false)
return booleen
    function checkEntity($recursive = false)
    {
        // Is an item assign to an entity
        if ($this->isEntityAssign()) {
            // Can be recursive check
            if ($recursive && $this->maybeRecursive()) {
                return Session::haveAccessToEntity($this->getEntityID(), $this->isRecursive());
            }
            //  else : No recursive item         // Have access to entity
            return Session::haveAccessToEntity($this->getEntityID());
        }
        // else : Global item
        return true;
    }
CommonDBTM