Commit 123f70e7 authored by Cédric Anne's avatar Cédric Anne Committed by Johan Cwiklinski
Browse files

Fix ability to retrieve ITIL items document on API

parent 8156d205
......@@ -909,11 +909,11 @@ abstract class API extends CommonGLPI {
}
}
// retrieve item contracts
// retrieve item documents
if (isset($params['with_documents'])
&& $params['with_documents']) {
$fields['_documents'] = [];
if (!$itemtype != 'Ticket'
if (!($item instanceof CommonITILObject)
&& $itemtype != 'KnowbaseItem'
&& $itemtype != 'Reminder'
&& !Document::canView()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment