diff --git a/api/src/Vfs.php b/api/src/Vfs.php index 7e7baac49a..c13dbce8c9 100644 --- a/api/src/Vfs.php +++ b/api/src/Vfs.php @@ -1383,7 +1383,9 @@ class Vfs $vfs = new Vfs\StreamWrapper(); $stat = $vfs->url_stat($path,0); } - return $stat['uid'] == self::$user || // user is the owner + return $stat['uid'] == self::$user && // (current) user is the owner + // in sharing current user != self::$user and should NOT have owner rights + $GLOBALS['egw_info']['user']['account_id'] == self::$user || self::$is_root || // class runs with root rights !$stat['uid'] && $stat['gid'] && self::$is_admin; // group directory and user is an eGW admin } diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index 1e17d4edc2..c9709b3074 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -1321,7 +1321,8 @@ class filemanager_ui 5 => lang('Display of content'), 0 => lang('No access'), ); - if(($content['eacl'] = Vfs::get_eacl($content['path'])) !== false) // backend supports eacl + if(($content['eacl'] = Vfs::get_eacl($content['path'])) !== false && // backend supports eacl + $GLOBALS['egw_info']['user']['account_id'] == Vfs::$user) // leave eACL tab disabled for sharing { unset($readonlys['tabs']['filemanager.file.eacl']); // --> switch the tab on again foreach($content['eacl'] as &$eacl)