$content['permissions'] = $storage->getPermissions($content['path']);
$cache->update($content['fileid'], array('permissions' => $content['permissions']));
}
+ // if sharing was disabled for the user we remove the share permissions
+ if (\OCP\Util::isSharingDisabledForUser()) {
+ $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
+ }
$files[] = new FileInfo($path . '/' . $content['name'], $storage, $content['path'], $content);
}
}
}
$rootEntry['path'] = substr($path . '/' . $rootEntry['name'], strlen($user) + 2); // full path without /$user/
+
+ // if sharing was disabled for the user we remove the share permissions
+ if (\OCP\Util::isSharingDisabledForUser()) {
+ $content['permissions'] = $content['permissions'] & ~\OCP\PERMISSION_SHARE;
+ }
+
$files[] = new FileInfo($path . '/' . $rootEntry['name'], $subStorage, '', $rootEntry);
}
}