|
|
@ -44,12 +44,10 @@ use OCP\Files\DavUtil; |
|
|
use OCP\Files\FileInfo; |
|
|
use OCP\Files\FileInfo; |
|
|
use OCP\Files\IRootFolder; |
|
|
use OCP\Files\IRootFolder; |
|
|
use OCP\Files\StorageNotAvailableException; |
|
|
use OCP\Files\StorageNotAvailableException; |
|
|
use OCP\Share\IShare; |
|
|
|
|
|
use OCP\Share\Exceptions\ShareNotFound; |
|
|
use OCP\Share\Exceptions\ShareNotFound; |
|
|
use OCP\Share\IManager; |
|
|
use OCP\Share\IManager; |
|
|
|
|
|
|
|
|
abstract class Node implements \Sabre\DAV\INode { |
|
|
abstract class Node implements \Sabre\DAV\INode { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @var \OC\Files\View |
|
|
* @var \OC\Files\View |
|
|
*/ |
|
|
*/ |
|
|
@ -145,7 +143,6 @@ abstract class Node implements \Sabre\DAV\INode { |
|
|
* @throws \Sabre\DAV\Exception\Forbidden |
|
|
* @throws \Sabre\DAV\Exception\Forbidden |
|
|
*/ |
|
|
*/ |
|
|
public function setName($name) { |
|
|
public function setName($name) { |
|
|
|
|
|
|
|
|
// rename is only allowed if the update privilege is granted
|
|
|
// rename is only allowed if the update privilege is granted
|
|
|
if (!($this->info->isUpdateable() || ($this->info->getMountPoint() instanceof MoveableMount && $this->info->getInternalPath() === ''))) { |
|
|
if (!($this->info->isUpdateable() || ($this->info->getMountPoint() instanceof MoveableMount && $this->info->getInternalPath() === ''))) { |
|
|
throw new \Sabre\DAV\Exception\Forbidden(); |
|
|
throw new \Sabre\DAV\Exception\Forbidden(); |
|
|
@ -233,7 +230,7 @@ abstract class Node implements \Sabre\DAV\INode { |
|
|
/** |
|
|
/** |
|
|
* Returns the size of the node, in bytes |
|
|
* Returns the size of the node, in bytes |
|
|
* |
|
|
* |
|
|
* @return integer |
|
|
|
|
|
|
|
|
* @return int|float |
|
|
*/ |
|
|
*/ |
|
|
public function getSize() { |
|
|
public function getSize() { |
|
|
return $this->info->getSize(); |
|
|
return $this->info->getSize(); |
|
|
@ -271,7 +268,6 @@ abstract class Node implements \Sabre\DAV\INode { |
|
|
* @return int |
|
|
* @return int |
|
|
*/ |
|
|
*/ |
|
|
public function getSharePermissions($user) { |
|
|
public function getSharePermissions($user) { |
|
|
|
|
|
|
|
|
// check of we access a federated share
|
|
|
// check of we access a federated share
|
|
|
if ($user !== null) { |
|
|
if ($user !== null) { |
|
|
try { |
|
|
try { |
|
|
|