summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-04 09:53:47 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-04 19:18:25 +0100
commitb57aac0a89c55fb6b227a4271d6e0869f61a8924 (patch)
tree40c684f6089044742ecc4f86e7a78563e39fd9cd /lib
parentf9aa5d297114066d32e3fe3c93f433f83cb12e6c (diff)
downloadnextcloud-server-b57aac0a89c55fb6b227a4271d6e0869f61a8924.tar.gz
nextcloud-server-b57aac0a89c55fb6b227a4271d6e0869f61a8924.zip
[Share 2.0] Add missing post_update_permissions hook
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share20/manager.php12
-rw-r--r--lib/private/share20/share.php2
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php
index 6ea638b84e6..2a350f02d6a 100644
--- a/lib/private/share20/manager.php
+++ b/lib/private/share20/manager.php
@@ -613,6 +613,18 @@ class Manager implements IManager {
]);
}
+ if ($share->getPermissions() !== $originalShare->getPermissions()) {
+ \OC_Hook::emit('OCP\Share', 'post_update_permissions', array(
+ 'itemType' => $share->getNode() instanceof \OCP\Files\File ? 'file' : 'folder',
+ 'itemSource' => $share->getNode()->getId(),
+ 'shareType' => $share->getShareType(),
+ 'shareWith' => $share->getSharedWith(),
+ 'uidOwner' => $share->getSharedBy(),
+ 'permissions' => $share->getPermissions(),
+ 'path' => $share->getNode()->getPath(),
+ ));
+ }
+
return $share;
}
diff --git a/lib/private/share20/share.php b/lib/private/share20/share.php
index 448b05d20a3..cd30f24c42e 100644
--- a/lib/private/share20/share.php
+++ b/lib/private/share20/share.php
@@ -105,6 +105,8 @@ class Share implements \OCP\Share\IShare {
* @inheritdoc
*/
public function setNode(Node $node) {
+ $this->fileId = null;
+ $this->nodeType = null;
$this->node = $node;
return $this;
}