/** * Overloaded from commonDBTM * * @since version 0.83 * * @param $type itemtype of object to add * * @return rights **/ function canAddItem($type) { if ($type == 'Document' && $this->getField('status') == self::CLOSED) { return false; } return parent::canAddItem($type); }