diff options
Diffstat (limited to 'lib/private/connector/sabre/node.php')
-rw-r--r-- | lib/private/connector/sabre/node.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php index eede39cba8b..ca8dcce9e86 100644 --- a/lib/private/connector/sabre/node.php +++ b/lib/private/connector/sabre/node.php @@ -237,4 +237,33 @@ 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->getType() === \OCP\Files\FileInfo::TYPE_FILE) { + if ($this->info->isUpdateable()) { + $p .= 'W'; + } + } else { + if ($this->info->isDeletable()) { + $p .= 'D'; + } + if ($this->info->isUpdateable()) { + $p .= 'CK'; + } + } + return $p; + } } |