mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-20 09:58:04 +02:00
correctly propagate readonly for sharing and Collabora
This commit is contained in:
parent
be4696b857
commit
d426394685
@ -912,6 +912,11 @@ class Vfs
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if we check writable and have a readonly mount --> return false, as backends dont know about r/o url parameter
|
||||||
|
if ($check == self::WRITABLE && Vfs\StreamWrapper::url_is_readonly($stat['url']))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// check backend for extended acls (only if path given)
|
// check backend for extended acls (only if path given)
|
||||||
$ret = $path && self::_call_on_backend('check_extended_acl',array(isset($stat['url'])?$stat['url']:$path,$check),true); // true = fail silent if backend does not support
|
$ret = $path && self::_call_on_backend('check_extended_acl',array(isset($stat['url'])?$stat['url']:$path,$check),true); // true = fail silent if backend does not support
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ class Sharing
|
|||||||
}
|
}
|
||||||
$share['resolve_url'] = Vfs::resolve_url($share['share_path'], true, true, true, true); // true = fix evtl. contained url parameter
|
$share['resolve_url'] = Vfs::resolve_url($share['share_path'], true, true, true, true); // true = fix evtl. contained url parameter
|
||||||
// if share not writable append ro=1 to mount url to make it readonly
|
// if share not writable append ro=1 to mount url to make it readonly
|
||||||
if (!self::$db->from_bool($share['share_writable']))
|
if (!($share['share_writable'] & 1))
|
||||||
{
|
{
|
||||||
$share['resolve_url'] .= (strpos($share['resolve_url'], '?') ? '&' : '?').'ro=1';
|
$share['resolve_url'] .= (strpos($share['resolve_url'], '?') ? '&' : '?').'ro=1';
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,8 @@ class filemanager_shares extends filemanager_ui
|
|||||||
|
|
||||||
if (class_exists('EGroupware\\Collabora\\Wopi'))
|
if (class_exists('EGroupware\\Collabora\\Wopi'))
|
||||||
{
|
{
|
||||||
$query['col_filter'][] = 'share_writable != '.(int)EGroupware\Collabora\Wopi::WOPI_SHARE;
|
$query['col_filter'][] = 'share_writable NOT IN ('.
|
||||||
|
EGroupware\Collabora\Wopi::WOPI_WRITABLE.','.EGroupware\Collabora\Wopi::WOPI_READONLY.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((string)$query['col_filter']['share_passwd'] !== '')
|
if ((string)$query['col_filter']['share_passwd'] !== '')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user