make sure that we have the right permissions for the mount points

This commit is contained in:
Bjoern Schiessle 2014-04-04 16:54:02 +02:00
parent a27db9e4ca
commit c377893f0e
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ class Shared_Permissions extends Permissions {
*/ */
public function get($fileId, $user) { public function get($fileId, $user) {
if ($fileId == -1) { if ($fileId == -1) {
return \OCP\PERMISSION_READ; // if we ask for the mount point return -1 so that we can get the correct
// permissions by the path, with the root fileId we have no idea which share is meant
return -1;
} }
$source = \OCP\Share::getItemSharedWithBySource('file', $fileId, \OC_Share_Backend_File::FORMAT_SHARED_STORAGE, $source = \OCP\Share::getItemSharedWithBySource('file', $fileId, \OC_Share_Backend_File::FORMAT_SHARED_STORAGE,
null, true); null, true);