From c635c11f32fd9fb2e2ad85cc68df33ae2ab74cfc Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 20 Oct 2008 14:51:19 +0000 Subject: [PATCH] "fixed not working file upload after my commit from sunday: vfs & stream-wrapper use posix rights, egw_link::file_access uses EGW_ACL_{EDIT|READ}!" --- phpgwapi/inc/class.links_stream_wrapper.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.links_stream_wrapper.inc.php b/phpgwapi/inc/class.links_stream_wrapper.inc.php index 2657ac8ed3..b8692daf74 100644 --- a/phpgwapi/inc/class.links_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.links_stream_wrapper.inc.php @@ -87,7 +87,9 @@ class links_stream_wrapper extends sqlfs_stream_wrapper // which gives him then read AND write access to the file store of the entry else { - $access = egw_link::file_access($app,$id,$check,$rel_path); + // vfs & stream-wrapper use posix rights, egw_link::file_access uses EGW_ACL_{EDIT|READ}! + $required = $check & egw_vfs::WRITABLE ? EGW_ACL_EDIT : EGW_ACL_READ; + $access = egw_link::file_access($app,$id,$required,$rel_path); } if (self::DEBUG) error_log(__METHOD__."($url,$check) ".($access?"access granted ($app:$id:$rel_path)":'no access!!!')); return $access;