diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-05-19 16:52:03 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-05-19 16:52:03 +0200 |
commit | 95741f3936501e3ad6aeb26f93eeb28f9decc273 (patch) | |
tree | 36991750b64e6a768c54651ca0c923e4f1e4eb25 /lib/private/connector/sabre/node.php | |
parent | 04e6c12fe220171fc2e3c0f634915e7511cafa92 (diff) | |
parent | e5ee84ca9b7c2b95275fa7ea1100fe8c34a4d695 (diff) | |
download | nextcloud-server-95741f3936501e3ad6aeb26f93eeb28f9decc273.tar.gz nextcloud-server-95741f3936501e3ad6aeb26f93eeb28f9decc273.zip |
Merge pull request #8435 from owncloud/fix-8322-master
Expose permission via WebDAV
Diffstat (limited to 'lib/private/connector/sabre/node.php')
-rw-r--r-- | lib/private/connector/sabre/node.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php index eede39cba8b..ee38dfc8642 100644 --- a/lib/private/connector/sabre/node.php +++ b/lib/private/connector/sabre/node.php @@ -237,4 +237,36 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr return null; } + + /** + * @return string|null + */ + public function getDavPermissions() { + $p =''; + if ($this->info->isShared()) { + $p .= 'S'; + } + if ($this->info->isShareable()) { + $p .= 'R'; + } + if ($this->info->isMounted()) { + $p .= 'M'; + } + if ($this->info->isDeletable()) { + $p .= 'D'; + } + if ($this->info->isDeletable()) { + $p .= 'N'; + } + if ($this->info->getType() === \OCP\Files\FileInfo::TYPE_FILE) { + if ($this->info->isUpdateable()) { + $p .= 'W'; + } + } else { + if ($this->info->isUpdateable()) { + $p .= 'CK'; + } + } + return $p; + } } |