mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-14 18:08:21 +01:00
also remove mountpoints the user has no read access to from directory listings, eg. enabling versioning for an other user
This commit is contained in:
parent
61099d4a89
commit
dc0cee3d95
@ -922,20 +922,24 @@ class vfs_stream_wrapper implements iface_stream_wrapper
|
|||||||
*/
|
*/
|
||||||
function dir_readdir ( )
|
function dir_readdir ( )
|
||||||
{
|
{
|
||||||
|
// only return children readable by the user, if dir is not writable
|
||||||
|
do {
|
||||||
if ($this->extra_dirs && count($this->extra_dirs) > $this->extra_dir_ptr)
|
if ($this->extra_dirs && count($this->extra_dirs) > $this->extra_dir_ptr)
|
||||||
{
|
{
|
||||||
$file = $this->extra_dirs[$this->extra_dir_ptr++];
|
$file = $this->extra_dirs[$this->extra_dir_ptr++];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// only return children readable by the user, if dir is not writable
|
// do not return files in $this->extra_dir twice
|
||||||
do {
|
do {
|
||||||
$file = readdir($this->opened_dir);
|
$file = readdir($this->opened_dir);
|
||||||
}
|
}
|
||||||
while($file !== false && (is_array($this->extra_dirs) && in_array($file,$this->extra_dirs) || // dont return mountpoints twice
|
while($file !== false && (is_array($this->extra_dirs) && in_array($file,$this->extra_dirs))); // dont return mountpoints twice
|
||||||
self::HIDE_UNREADABLES && !$this->opened_dir_writable &&
|
|
||||||
!egw_vfs::check_access(egw_vfs::concat($this->opened_dir_url,$file),egw_vfs::READABLE)));
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
while($file !== false && self::HIDE_UNREADABLES && !$this->opened_dir_writable &&
|
||||||
|
!egw_vfs::check_access(egw_vfs::concat($this->opened_dir_url,$file),egw_vfs::READABLE));
|
||||||
|
|
||||||
if (self::LOG_LEVEL > 1) error_log(__METHOD__."( $this->opened_dir ) = '$file'");
|
if (self::LOG_LEVEL > 1) error_log(__METHOD__."( $this->opened_dir ) = '$file'");
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user