forked from extern/egroupware
fix broken file-access cache after a917293 (fix smallPART file-access depending on full path)
fix wrong condition when storing an attachment, either the file or it's directory must be writable
This commit is contained in:
parent
6602078660
commit
40a42ed1c8
@ -1798,10 +1798,7 @@ class Link extends Link\Storage
|
||||
{
|
||||
$cache |= $ret ? $required|Acl::READ : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret = $ret ? $required|Acl::READ : 0;
|
||||
}
|
||||
$ret = $ret ? $required|Acl::READ : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2017,7 +2017,7 @@ class Vfs extends Vfs\Base
|
||||
if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !is_uploaded_file()");
|
||||
return false;
|
||||
}
|
||||
if (!(self::is_writable($target) || ($dir = self::dirname($target)) && self::is_writable($dir)))
|
||||
if (!self::is_writable($target) && !(($dir = self::dirname($target)) && self::is_writable($dir)))
|
||||
{
|
||||
if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !writable");
|
||||
return false;
|
||||
|
@ -113,7 +113,7 @@ class StreamWrapper extends LinksParent
|
||||
// vfs & stream-wrapper use posix rights, Api\Link::file_access uses Api\Acl::{EDIT|READ}!
|
||||
$required = $check & Vfs::WRITABLE ? Api\Acl::EDIT : Api\Acl::READ;
|
||||
$access = Api\Link::file_access($app, $id, $required, $rel_path, $this->user);
|
||||
$what = "from Api\Link::file_access('$app', $id, $required, '$rel_path,".$this->user.")";
|
||||
$what = "from Api\Link::file_access('$app', $id, $required, '$rel_path', ".$this->user.")";
|
||||
}
|
||||
if (self::DEBUG) error_log(__METHOD__."($url,$check) user=".Vfs::$user." ($what) ".($access?"access granted ($app:$id:$rel_path)":'no access!!!'));
|
||||
return $access;
|
||||
|
@ -1569,7 +1569,7 @@ class infolog_bo
|
||||
{
|
||||
Link::set_cache('infolog',$info['info_id'],
|
||||
$this->link_title($info),
|
||||
$this->file_access($info,Acl::EDIT) ? EGW_ACL_READ|EGW_ACL_EDIT :
|
||||
$this->file_access($info,Acl::EDIT) ? Acl::READ|Acl::EDIT :
|
||||
($this->file_access($info,Acl::READ) ? Acl::READ : 0));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user