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
parent 62299b8a15
commit 4e339a62a4
2 changed files with 6 additions and 3 deletions

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! 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( $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'] = '/'; $share['share_root'] = '/';

View File

@ -304,7 +304,7 @@ class filemanager_hooks
*/ */
static function getEditorLink() static function getEditorLink()
{ {
foreach (Api\Hooks::process('filemanager-editor-link', 'collabora',true) as $app => $link) foreach (Api\Hooks::process('filemanager-editor-link', 'collabora') as $app => $link)
{ {
if ($link && ($access = \EGroupware\Api\Vfs\Links\StreamWrapper::check_app_rights($app)) && if ($link && ($access = \EGroupware\Api\Vfs\Links\StreamWrapper::check_app_rights($app)) &&
(empty($GLOBALS['egw_info']['user']['preferences']['filemanager']['document_doubleclick_action']) || (empty($GLOBALS['egw_info']['user']['preferences']['filemanager']['document_doubleclick_action']) ||