mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +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
e5ac08edab
commit
ef278963d7
@ -922,20 +922,24 @@ class vfs_stream_wrapper implements iface_stream_wrapper
|
||||
*/
|
||||
function dir_readdir ( )
|
||||
{
|
||||
if ($this->extra_dirs && count($this->extra_dirs) > $this->extra_dir_ptr)
|
||||
{
|
||||
$file = $this->extra_dirs[$this->extra_dir_ptr++];
|
||||
}
|
||||
else
|
||||
{
|
||||
// only return children readable by the user, if dir is not writable
|
||||
do {
|
||||
$file = readdir($this->opened_dir);
|
||||
// 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)
|
||||
{
|
||||
$file = $this->extra_dirs[$this->extra_dir_ptr++];
|
||||
}
|
||||
else
|
||||
{
|
||||
// do not return files in $this->extra_dir twice
|
||||
do {
|
||||
$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'");
|
||||
return $file;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user