Collabora's extra share needs to use restricted fstab from original share, not full fstab

This commit is contained in:
nathan 2022-11-17 09:29:42 -07:00
parent 19f4e13c7a
commit 57be82de46

View File

@ -16,6 +16,7 @@ namespace EGroupware\Api\Vfs;
use EGroupware\Api;
use EGroupware\Api\Json\Response;
use EGroupware\Api\Vfs;
use EGroupware\Collabora\Wopi;
use EGroupware\Filemanager\Sharing\AnonymousList;
use EGroupware\Filemanager\Sharing\Ui;
use EGroupware\Filemanager\Sharing\Ui as ShareUi;
@ -444,7 +445,10 @@ class Sharing extends \EGroupware\Api\Sharing
$stat['url'] = substr($stat['url'], 0, strlen($stat['url']) - 1);
}
// Make sure we get the correct path if sharing from a share
if(isset($GLOBALS['egw']->sharing) && array_key_exists(static::get_token(), $GLOBALS['egw']->sharing) && $exists)
if(isset($GLOBALS['egw']->sharing) && array_key_exists(static::get_token(), $GLOBALS['egw']->sharing) && $exists
// Not for Collabora, it's working with share fstab and can't access full URL
&& $mode !== Wopi::WOPI_WRITABLE
)
{
$path = $stat['url'];
}