Fix attempting to open a document link in infolog pops collabora link even the user has no permission to the collabora app

This commit is contained in:
Hadi Nategh 2017-11-16 16:31:22 +01:00
parent 867c661796
commit 1f998f1612
2 changed files with 4 additions and 2 deletions

View File

@ -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)
{

View File

@ -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];
}