diff options
Diffstat (limited to 'apps/files_sharing/lib/sharedstorage.php')
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 19ee6085e47..1ac57053e25 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -67,7 +67,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { if ($source) { $source['path'] .= '.part'; // All partial files have delete permission - $source['permissions'] |= \OCP\PERMISSION_DELETE; + $source['permissions'] |= \OCP\Constants::PERMISSION_DELETE; } } else { $source = \OC_Share_Backend_File::getSource($target, $this->getMountPoint(), $this->getItemType()); @@ -109,11 +109,11 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { $permissions = $this->share['permissions']; // part files and the mount point always have delete permissions if ($target === '' || pathinfo($target, PATHINFO_EXTENSION) === 'part') { - $permissions |= \OCP\PERMISSION_DELETE; + $permissions |= \OCP\Constants::PERMISSION_DELETE; } if (\OC_Util::isSharingDisabledForUser()) { - $permissions &= ~\OCP\PERMISSION_SHARE; + $permissions &= ~\OCP\Constants::PERMISSION_SHARE; } return $permissions; @@ -197,7 +197,7 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { } public function isCreatable($path) { - return ($this->getPermissions($path) & \OCP\PERMISSION_CREATE); + return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_CREATE); } public function isReadable($path) { @@ -205,18 +205,18 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { } public function isUpdatable($path) { - return ($this->getPermissions($path) & \OCP\PERMISSION_UPDATE); + return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_UPDATE); } public function isDeletable($path) { - return ($this->getPermissions($path) & \OCP\PERMISSION_DELETE); + return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_DELETE); } public function isSharable($path) { if (\OCP\Util::isSharingDisabledForUser()) { return false; } - return ($this->getPermissions($path) & \OCP\PERMISSION_SHARE); + return ($this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE); } public function file_exists($path) { |