Filemanager: Fix shared directory could not open odp (or other non-odt files) in Collabora

Also fix "Permission denied" error trying to open office files without Collabora
This commit is contained in:
nathangray 2019-09-18 11:54:08 -06:00 committed by Ralf Becker
parent 9b3c13312b
commit fb9530c907

View File

@ -118,9 +118,12 @@ class Sharing extends \EGroupware\Api\Sharing
}
if (!$keep_session) // do NOT change to else, as we might have set $keep_session=false!
{
// only allow filemanager app
// only allow filemanager app & collabora
// (In some cases, $GLOBALS['egw_info']['apps'] is not yet set)
$apps = $GLOBALS['egw']->acl->get_user_applications($share['share_owner']);
$GLOBALS['egw_info']['user']['apps'] = array(
'filemanager' => $GLOBALS['egw_info']['apps']['filemanager']
'filemanager' => $GLOBALS['egw_info']['apps']['filemanager'] || true,
'collabora' => $GLOBALS['egw_info']['apps']['collabora'] || $apps['collabora']
);
$share['share_root'] = '/';