Make sure share cleanup job doesn't remove shares just because of access rights

This commit is contained in:
nathangray 2020-03-30 09:35:59 -06:00
parent 2e753d942a
commit c937f50193
3 changed files with 9 additions and 2 deletions

View File

@ -126,6 +126,10 @@ class Sharing extends \EGroupware\Api\Sharing
protected static function check_path($share)
{
list($app, $id) = explode('::', $share['share_path']);
if(!\EGroupware\Api\Link::$app_register[$app])
{
\EGroupware\Api\Link::init_static();
}
return (boolean) \EGroupware\Api\Link::title($app, $id);
}

View File

@ -825,7 +825,7 @@ class Sharing
if (!isset(self::$db)) self::$db = $GLOBALS['egw']->db;
foreach(self::$db->select(self::TABLE, array(
'share_id','share_path'
'share_id','share_path', 'share_writable'
), array(), __LINE__, __FILE__, false) as $share)
{
$class = self::get_share_class($share);

View File

@ -364,7 +364,10 @@ class Sharing extends \EGroupware\Api\Sharing
{
$share['share_path'] = Api\Vfs::parse_url($share['share_path'], PHP_URL_PATH);
}
return Vfs::file_exists($share['share_path']);
Vfs::$is_root = true;
$exists = Vfs::file_exists($share['share_path']);
Vfs::$is_root = false;
return $exists;
}
/**