Add permission check for collabora before setting actions to open in editor

This commit is contained in:
nathangray 2017-10-05 09:50:19 -06:00
parent 53acbfe3ea
commit 0183635c02

View File

@ -1867,15 +1867,20 @@ abstract class Merge
$documents = array(); $documents = array();
$editable_mimes = array(); $editable_mimes = array();
if ($export_limit == null) $export_limit = self::getExportLimit(); // check if there is a globalsetting if ($export_limit == null) $export_limit = self::getExportLimit(); // check if there is a globalsetting
try { try {
if (class_exists('EGroupware\\collabora\\Bo') && $discovery = \EGroupware\collabora\Bo::discover()) if (class_exists('EGroupware\\collabora\\Bo') &&
$GLOBALS['egw_info']['user']['apps']['collabora'] &&
$discovery = \EGroupware\collabora\Bo::discover()
)
{ {
$editable_mimes = $discovery; $editable_mimes = $discovery;
} }
} }
catch (\Exception $e) { catch (\Exception $e)
unset($e); {
// ignore failed discovery // ignore failed discovery
unset($e);
} }
if ($default_doc && ($file = Api\Vfs::stat($default_doc))) // put default document on top if ($default_doc && ($file = Api\Vfs::stat($default_doc))) // put default document on top
{ {