summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-07-24 21:16:47 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-07-24 21:16:47 -0400
commitfc72d4b10f0b0a78faee2f133e833fa6ea10ced7 (patch)
treeb7bca204af675b97772f0e8ec5418e999599bb22 /apps/files_sharing
parentf7b89f047504740224f664917d6588c1fe203877 (diff)
downloadnextcloud-server-fc72d4b10f0b0a78faee2f133e833fa6ea10ced7.tar.gz
nextcloud-server-fc72d4b10f0b0a78faee2f133e833fa6ea10ced7.zip
Add root directory checks for CRUDS permissions in shared storage
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/sharedstorage.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index a4510f2e77c..38d5f10e286 100644
--- a/apps/files_sharing/sharedstorage.php
+++ b/apps/files_sharing/sharedstorage.php
@@ -188,6 +188,9 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common {
}
public function isCreatable($path) {
+ if ($path == '') {
+ return false;
+ }
return ($this->getPermissions($path) & OCP\Share::PERMISSION_CREATE);
}
@@ -196,14 +199,23 @@ class OC_Filestorage_Shared extends OC_Filestorage_Common {
}
public function isUpdatable($path) {
+ if ($path == '') {
+ return false;
+ }
return ($this->getPermissions($path) & OCP\Share::PERMISSION_UPDATE);
}
public function isDeletable($path) {
+ if ($path == '') {
+ return false;
+ }
return ($this->getPermissions($path) & OCP\Share::PERMISSION_DELETE);
}
public function isSharable($path) {
+ if ($path == '') {
+ return false;
+ }
return ($this->getPermissions($path) & OCP\Share::PERMISSION_SHARE);
}