mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
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
3ac6cbba87
commit
965159d505
@ -1798,11 +1798,8 @@ class Link extends Link\Storage
|
||||
{
|
||||
$cache |= $ret ? $required|Acl::READ : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret = $ret ? $required|Acl::READ : 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret = $cache |= self::title($app,$id) ? Acl::READ|Acl::EDIT : 0;
|
||||
|
@ -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