From 1f998f16128218135d2ca04ddb4d3c006a16a917 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 16 Nov 2017 16:31:22 +0100 Subject: [PATCH] Fix attempting to open a document link in infolog pops collabora link even the user has no permission to the collabora app --- api/src/Vfs/Links/StreamWrapper.php | 2 +- filemanager/inc/class.filemanager_hooks.inc.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/src/Vfs/Links/StreamWrapper.php b/api/src/Vfs/Links/StreamWrapper.php index 27277b8cfb..ed9c9e166e 100644 --- a/api/src/Vfs/Links/StreamWrapper.php +++ b/api/src/Vfs/Links/StreamWrapper.php @@ -126,7 +126,7 @@ class StreamWrapper extends LinksParent * @param string $app * @return boolean */ - protected static function check_app_rights($app) + public static function check_app_rights($app) { if ($GLOBALS['egw_info']['user']['account_id'] == Vfs::$user) { diff --git a/filemanager/inc/class.filemanager_hooks.inc.php b/filemanager/inc/class.filemanager_hooks.inc.php index 50b22e8898..2a7609b9d7 100644 --- a/filemanager/inc/class.filemanager_hooks.inc.php +++ b/filemanager/inc/class.filemanager_hooks.inc.php @@ -313,7 +313,9 @@ class filemanager_hooks ); foreach ($implemented as $app) { - if (($l = Api\Hooks::process('filemanager-editor-link','collabora', true)) && $l[$app]) + + if ( \EGroupware\Stylite\Vfs\Links\StreamWrapper::check_app_rights($app) && + ($l = Api\Hooks::process('filemanager-editor-link',$app, true)) && $l[$app]) { $link = $l[$app]; }