function check($ID, $right, array &$input = NULL)
{
global $CFG_GLPI;
// Check item exists
if (!$this->isNewID($ID) && (!isset($this->fields['id']) || $this->fields['id'] != $ID) && !$this->getFromDB($ID)) {
// Gestion timeout session
Session::redirectIfNotLoggedIn();
Html::displayNotFoundError();
} else {
if (!$this->can($ID, $right, $input)) {
// Gestion timeout session
Session::redirectIfNotLoggedIn();
Html::displayRightError();
}
}
}