diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-15 00:57:30 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-15 00:57:30 +0100 |
commit | cbcd9ba84ada830d91a6f1d7bee0ac59762835ed (patch) | |
tree | b5c71d4d517f915d5c22979947796aba06021ce6 /lib/files/storage/common.php | |
parent | bf2ac9f113d41dc944f42d1516649a3a72e88a65 (diff) | |
download | nextcloud-server-cbcd9ba84ada830d91a6f1d7bee0ac59762835ed.tar.gz nextcloud-server-cbcd9ba84ada830d91a6f1d7bee0ac59762835ed.zip |
allow storage backends to implement custom permission management
Diffstat (limited to 'lib/files/storage/common.php')
-rw-r--r-- | lib/files/storage/common.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php index f471752d1ff..cf6fe64a4f2 100644 --- a/lib/files/storage/common.php +++ b/lib/files/storage/common.php @@ -57,19 +57,19 @@ abstract class Common implements \OC\Files\Storage\Storage { public function getPermissions($path){ $permissions = 0; if($this->isCreatable($path)){ - $permissions |= \OCP\Share::PERMISSION_CREATE; + $permissions |= \OCP\PERMISSION_CREATE; } if($this->isReadable($path)){ - $permissions |= \OCP\Share::PERMISSION_READ; + $permissions |= \OCP\PERMISSION_READ; } if($this->isUpdatable($path)){ - $permissions |= \OCP\Share::PERMISSION_UPDATE; + $permissions |= \OCP\PERMISSION_UPDATE; } if($this->isDeletable($path)){ - $permissions |= \OCP\Share::PERMISSION_DELETE; + $permissions |= \OCP\PERMISSION_DELETE; } if($this->isSharable($path)){ - $permissions |= \OCP\Share::PERMISSION_SHARE; + $permissions |= \OCP\PERMISSION_SHARE; } return $permissions; } @@ -259,6 +259,10 @@ abstract class Common implements \OC\Files\Storage\Storage { return new \OC\Files\Cache\Scanner($this); } + public function getPermissionsCache(){ + return new \OC\Files\Cache\Permissions($this); + } + /** * get the owner of a path * @param string $path The path to get the owner |